diff options
Diffstat (limited to 'training/README.md')
| -rw-r--r-- | training/README.md | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/training/README.md b/training/README.md new file mode 100644 index 0000000..08379ee --- /dev/null +++ b/training/README.md @@ -0,0 +1,167 @@ +# Image Style Processor + +A comprehensive Python script that applies artistic hand-drawn and futuristic effects to images. + +## Requirements + +- Python 3 +- OpenCV (cv2) +- NumPy + +Install dependencies: +```bash +pip install opencv-python numpy +``` + +## Usage + +```bash +python3 image_style_processor.py <input_directory> <output_directory> <style> +``` + +### Arguments + +- `input_directory`: Directory containing your input images (PNG, JPG, JPEG) +- `output_directory`: Directory where processed images will be saved (created if doesn't exist) +- `style`: The artistic style to apply (see below) + +## Available Styles + +### Sketch Styles + +1. **pencil_sketch** - Dense cross-hatching with progressive layers in shadows + - Best for: Detailed technical drawings, architectural scenes + - Features: Clean line art, 5 layers of cross-hatching, strong shadow definition + +2. **ink_drawing** - Bold black outlines with comic book aesthetic + - Best for: Graphic novel style, high contrast scenes + - Features: Bold outlines, posterized tones, minimal shading + +3. **charcoal_pastel** - Dramatic contrasts with soft, smudged textures + - Best for: Portraits, dramatic landscapes + - Features: Soft blending, grainy texture, highlighted areas + +4. **conte_crayon** - Directional strokes following image contours + - Best for: Figure studies, natural forms + - Features: Stroke direction follows gradients, cross-hatching in dark areas + +5. **gesture_sketch** - Loose, quick observational sketch style + - Best for: Quick studies, energetic compositions + - Features: Randomized line wobble, sparse suggestion lines + +### Futuristic Styles + +6. **circuit_board** - Tech blueprint with circuit paths and geometric patterns + - Best for: Sci-fi imagery, technological themes + - Features: Multi-layer circuit paths, connection nodes, technical grid overlay + +7. **glitch_art** - Digital corruption with scan line shifts and pixel sorting + - Best for: Cyberpunk aesthetics, digital art + - Features: Horizontal scan artifacts, block displacement, pixel sorting, noise strips + +8. **wireframe_topo** - Topographic contour lines with holographic grid + - Best for: Landscape, abstract patterns, sci-fi hologram effect + - Features: 20 contour levels, scan lines, measurement markers, grid overlay + +9. **data_mosaic** - Voronoi geometric fragmentation with angular cells + - Best for: Abstract art, geometric compositions + - Features: 200 Voronoi cells, posterized tones, embedded geometric patterns + +10. **holographic_scan** - CRT/hologram display with scanlines and HUD elements + - Best for: Retro-futuristic, heads-up display aesthetic + - Features: Scanlines, interference patterns, glitch effects, corner brackets, crosshair + +## Examples + +### Sketch Effects + +Process images with pencil sketch: +```bash +python3 image_style_processor.py ./photos ./output pencil_sketch +``` + +Apply ink drawing style: +```bash +python3 image_style_processor.py ./input ./sketches ink_drawing +``` + +Create charcoal effect: +```bash +python3 image_style_processor.py ./images ./results charcoal_pastel +``` + +### Futuristic Effects + +Apply circuit board style: +```bash +python3 image_style_processor.py ./photos ./output circuit_board +``` + +Create glitch art: +```bash +python3 image_style_processor.py ./input ./glitched glitch_art +``` + +Apply holographic effect: +```bash +python3 image_style_processor.py ./images ./holo holographic_scan +``` + +## Output + +- Processed images are saved to the output directory with **the same filename** as the input +- Supported input formats: PNG, JPG, JPEG (case-insensitive) +- Output format: PNG (preserves quality) +- Original images are never modified + +## Style Comparison + +### Sketch Styles +- **pencil_sketch**: Most detailed, traditional drawing look +- **ink_drawing**: Boldest, most graphic/comic-like +- **charcoal_pastel**: Softest, most artistic/painterly +- **conte_crayon**: Most directional, follows contours +- **gesture_sketch**: Loosest, most expressive + +### Futuristic Styles +- **circuit_board**: Cleanest, most technical/blueprint-like +- **glitch_art**: Most chaotic, digital corruption aesthetic +- **wireframe_topo**: Most structured, topographic/hologram feel +- **data_mosaic**: Most geometric, fragmented cells +- **holographic_scan**: Most retro-futuristic, HUD/CRT display + +## Tips + +- Images are automatically converted to grayscale before processing +- All styles work best with high-resolution images (300+ DPI recommended) +- Processing time varies by style: + - Fast: ink_drawing, glitch_art, holographic_scan + - Medium: charcoal_pastel, gesture_sketch, circuit_board, wireframe_topo + - Slow: pencil_sketch, conte_crayon, data_mosaic (due to intensive computation) +- For batch processing large collections, consider processing in smaller batches +- Randomized styles (glitch_art, gesture_sketch, data_mosaic) will produce slightly different results each run + +## Technical Notes + +### Randomization +Some styles use randomization for natural variation: +- **glitch_art**: Random scan line shifts, block positions +- **gesture_sketch**: Random line wobble, stroke placement +- **data_mosaic**: Random Voronoi cell centers +- **circuit_board**: Random pattern placement in dark regions +- **holographic_scan**: Random glitch line positions + +### Processing Details +- **pencil_sketch**: Uses 5-level progressive cross-hatching algorithm +- **conte_crayon**: Follows Sobel gradients for directional strokes +- **wireframe_topo**: Generates 20 brightness-based contour levels +- **data_mosaic**: Creates 200 Voronoi cells via nearest-neighbor algorithm +- **holographic_scan**: Applies scanline patterns and interference waves + +## License + +Free to use and modify for any purpose. + +## Version + +Version 1.0 - Complete collection of 10 artistic styles (5 sketch + 5 futuristic) |
