π¬ AI-powered camera angle manipulation and batch processing for Qwen Image Edit
This project provides comprehensive camera angle control for images using the Qwen-Image-Edit-2509 model with camera angle LoRA adapters. It includes both a web interface and command-line tools for batch processing.
git clone https://github.com/your-username/Qwen-Image-Edit-Angles.git
cd Qwen-Image-Edit-Angles
# Using conda (recommended)
conda create -n qwen-camera python=3.10
conda activate qwen-camera
# OR using venv
python -m venv qwen-camera
source qwen-camera/bin/activate # On Windows: qwen-camera\Scripts\activate
pip install -r requirements.txt
python -c "import torch; print(f'PyTorch: {torch.__version__}, CUDA: {torch.cuda.is_available()}')"
python app.py
Then open http://localhost:7860 in your browser.
# Basic usage with default camera angles
python cli_camera.py --input image.jpg
# Process specific rotation angles
python cli_camera.py --input image.jpg --rotate -45 0 45 90
# Process from URL
python cli_camera.py --url https://example.com/image.jpg --output results/
# Generate all preset angles
python cli_camera.py --input image.jpg --preset all
Generate multiple product shots from a single image:
python cli_camera.py --input product.jpg --rotate -45 -30 0 30 45 --move 3 6 --wide
Create different architectural perspectives:
python cli_camera.py --input building.jpg --rotate -90 -45 0 45 90 --tilt -1 0 1
Generate various portrait angles:
python cli_camera.py --input portrait.jpg --rotate -15 0 15 --move 0 5 8
Create a JSON configuration file for complex batch processing:
{
"input_path": "image.jpg",
"input_url": "",
"output_dir": "output",
"camera_configs": [
{
"rotate_deg": -90,
"move_forward": 0,
"vertical_tilt": 0,
"wideangle": false,
"seed": 42,
"randomize_seed": false,
"true_guidance_scale": 1.0,
"num_inference_steps": 4,
"height": 1024,
"width": 1024
},
{
"rotate_deg": 45,
"move_forward": 5,
"vertical_tilt": 1,
"wideangle": true,
"seed": 123,
"randomize_seed": false,
"true_guidance_scale": 1.5,
"num_inference_steps": 6,
"height": 1024,
"width": 1024
}
]
}
Then run:
python cli_camera.py --config my_config.json
| Parameter | Description | Default | Range |
|---|---|---|---|
--input | Input image path | Required | File path |
--rotate | Rotation angles in degrees | 0 | -180 to 180 |
--move | Forward movement (0-10 scale) | 0 | 0 to 10 |
--tilt | Vertical tilt (-1, 0, 1) | 0 | -1, 0, 1 |
--wide | Enable wide-angle lens | false | flag |
--steps | Inference steps | 4 | 1 to 40 |
--guidance | Guidance scale | 1.0 | 1.0 to 10.0 |
--height | Image height | 1024 | 256 to 2048 |
--width | Image width | 1024 | 256 to 2048 |
output/
βββ 00_original.png # Original input image
βββ 01_rot_-45deg.png # 45-degree left rotation
βββ 02_move_3.png # Forward movement
βββ 03_tilt_-1.png # Bird's eye view
βββ 04_wide.png # Wide angle lens
βββ 05_rot_45deg_wide.png # Combination effects
βββ metadata.json # Processing metadata
This project is a fork and extension of Qwen Image Edit Angles by linoyts.
Original Space: https://huggingface.co/spaces/linoyts/Qwen-Image-Edit-Angles
Core Models:
If you use this project in your research, please cite:
@software{qwen_image_edit_angles_2024,
title={Qwen Image Edit Angles - Camera Control Extension},
author={linoyts},
year={2024},
url={https://huggingface.co/spaces/linoyts/Qwen-Image-Edit-Angles}
}
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
6 commits
Python
100.0%
π¬ AI-powered camera angle manipulation and batch processing for Qwen Image Edit
This project provides comprehensive camera angle control for images using the Qwen-Image-Edit-2509 model with camera angle LoRA adapters. It includes both a web interface and command-line tools for batch processing.
git clone https://github.com/your-username/Qwen-Image-Edit-Angles.git
cd Qwen-Image-Edit-Angles
# Using conda (recommended)
conda create -n qwen-camera python=3.10
conda activate qwen-camera
# OR using venv
python -m venv qwen-camera
source qwen-camera/bin/activate # On Windows: qwen-camera\Scripts\activate
pip install -r requirements.txt
python -c "import torch; print(f'PyTorch: {torch.__version__}, CUDA: {torch.cuda.is_available()}')"
python app.py
Then open http://localhost:7860 in your browser.
# Basic usage with default camera angles
python cli_camera.py --input image.jpg
# Process specific rotation angles
python cli_camera.py --input image.jpg --rotate -45 0 45 90
# Process from URL
python cli_camera.py --url https://example.com/image.jpg --output results/
# Generate all preset angles
python cli_camera.py --input image.jpg --preset all
Generate multiple product shots from a single image:
python cli_camera.py --input product.jpg --rotate -45 -30 0 30 45 --move 3 6 --wide
Create different architectural perspectives:
python cli_camera.py --input building.jpg --rotate -90 -45 0 45 90 --tilt -1 0 1
Generate various portrait angles:
python cli_camera.py --input portrait.jpg --rotate -15 0 15 --move 0 5 8
Create a JSON configuration file for complex batch processing:
{
"input_path": "image.jpg",
"input_url": "",
"output_dir": "output",
"camera_configs": [
{
"rotate_deg": -90,
"move_forward": 0,
"vertical_tilt": 0,
"wideangle": false,
"seed": 42,
"randomize_seed": false,
"true_guidance_scale": 1.0,
"num_inference_steps": 4,
"height": 1024,
"width": 1024
},
{
"rotate_deg": 45,
"move_forward": 5,
"vertical_tilt": 1,
"wideangle": true,
"seed": 123,
"randomize_seed": false,
"true_guidance_scale": 1.5,
"num_inference_steps": 6,
"height": 1024,
"width": 1024
}
]
}
Then run:
python cli_camera.py --config my_config.json
| Parameter | Description | Default | Range |
|---|---|---|---|
--input | Input image path | Required | File path |
--rotate | Rotation angles in degrees | 0 | -180 to 180 |
--move | Forward movement (0-10 scale) | 0 | 0 to 10 |
--tilt | Vertical tilt (-1, 0, 1) | 0 | -1, 0, 1 |
--wide | Enable wide-angle lens | false | flag |
--steps | Inference steps | 4 | 1 to 40 |
--guidance | Guidance scale | 1.0 | 1.0 to 10.0 |
--height | Image height | 1024 | 256 to 2048 |
--width | Image width | 1024 | 256 to 2048 |
output/
βββ 00_original.png # Original input image
βββ 01_rot_-45deg.png # 45-degree left rotation
βββ 02_move_3.png # Forward movement
βββ 03_tilt_-1.png # Bird's eye view
βββ 04_wide.png # Wide angle lens
βββ 05_rot_45deg_wide.png # Combination effects
βββ metadata.json # Processing metadata
This project is a fork and extension of Qwen Image Edit Angles by linoyts.
Original Space: https://huggingface.co/spaces/linoyts/Qwen-Image-Edit-Angles
Core Models:
If you use this project in your research, please cite:
@software{qwen_image_edit_angles_2024,
title={Qwen Image Edit Angles - Camera Control Extension},
author={linoyts},
year={2024},
url={https://huggingface.co/spaces/linoyts/Qwen-Image-Edit-Angles}
}
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
6 commits
Python
100.0%