Qwen2-VL-2B Photography Critique
A fine-tuned Qwen2-VL-2B-Instruct vision-language model that acts as a professional photography instructor. Given an input photograph, the model returns a structured JSON critique covering composition, lighting, technical execution, and actionable improvement steps.
GGUF (Quantized):
dulshanbandara/qwen2vl-2b-photography-critique-GGUF
Dataset:dulshanbandara/rpcd-elite-5k-v4
Model Details
Model Description
This model is a fine-tuned version of Qwen2-VL-2B-Instruct designed to evaluate photographs and produce structured, expert-level critiques in JSON format. It scores images across three dimensions — composition, lighting, and technical execution — and provides detailed written feedback along with ordered improvement suggestions.
The model was fine-tuned using LoRA (Low-Rank Adaptation) on a curated dataset of 3,504 high-quality photography critiques derived from the Reddit Photo Critique Dataset (RPCD), with critique synthesis performed by Gemma 4 31B. It is designed to power the backend of an AI Photography Training mobile application.
- Developed by: dulshanbandara
- Model type: Vision-Language Model (VLM), fine-tuned with LoRA
- Language(s) (NLP): English
- License: Apache 2.0
- Finetuned from model: unsloth/Qwen2-VL-2B-Instruct-bnb-4bit (Qwen2-VL-2B-Instruct, 2.24B parameters)
Model Sources
- Repository: dulshanbandara/qwen2vl-2b-photography-critique
- GGUF Quantized: dulshanbandara/qwen2vl-2b-photography-critique-GGUF
- Demo: AI Photography Backend (HF Space)
Uses
Direct Use
Upload a photograph and receive a structured JSON critique containing:
- Overall Score (1–10)
- Composition — score + detailed feedback
- Lighting — score + detailed feedback
- Technical Execution — score + detailed feedback
- Improvement Steps — actionable, ordered suggestions
The model is optimized for single-image analysis and outputs machine-parseable JSON, making it suitable for integration into apps and automated pipelines.
Downstream Use
- Backend inference engine for AI Photography Training mobile applications
- Integration via REST API (Gradio-based deployment on Hugging Face Spaces)
- GGUF-quantized deployment via
llama-cpp-pythonfor CPU-only inference
Out-of-Scope Use
- Not a general-purpose VLM: The model is specifically fine-tuned for photography critique and will produce poor results on unrelated vision-language tasks (e.g., OCR, general VQA, document understanding).
- Not for professional grading: The scores and critiques are synthesized from community feedback and should not be treated as authoritative professional assessments.
- Non-photographic images: The model was trained exclusively on photographs; performance on illustrations, screenshots, or synthetic images is undefined.
Bias, Risks, and Limitations
- Community bias: The training data originates from the r/photocritique subreddit, which skews toward Western photographic conventions and aesthetics. Critiques may not adequately represent diverse cultural or regional photographic traditions.
- Score distribution bias: The training data has a Gaussian distribution centered around 7 (out of 10), meaning the model may under-represent very low (1–3) or very high (9–10) scores.
- Synthesis artifacts: Critiques were synthesized by Gemma 4 31B from human comments, introducing a layer of AI interpretation that may deviate from the original human intent.
- Hallucination risk: Like all language models, the model may generate plausible-sounding but factually incorrect photographic advice.
Recommendations
Users should treat the model's output as a learning aid rather than definitive professional judgment. Scores and feedback should be contextualized alongside other educational resources. Developers integrating this model should clearly communicate to end-users that critiques are AI-generated.
How to Get Started with the Model
Using Hugging Face Transformers (GPU)
from unsloth import FastVisionModel
model, tokenizer = FastVisionModel.from_pretrained(
"dulshanbandara/qwen2vl-2b-photography-critique",
load_in_4bit=True,
)
FastVisionModel.for_inference(model)
Using llama-cpp-python (CPU)
from llama_cpp import Llama
from llama_cpp.llama_chat_format import Qwen2VLChatHandler
from huggingface_hub import hf_hub_download
import base64
# 1. Download and load models
chat_handler = Qwen2VLChatHandler(
clip_model_path=hf_hub_download(
"dulshanbandara/qwen2vl-2b-photography-critique-GGUF",
"qwen2vl-mmproj-f16.gguf"
),
verbose=False,
)
llm = Llama(
model_path=hf_hub_download(
"dulshanbandara/qwen2vl-2b-photography-critique-GGUF",
"qwen2vl-language-q4_k_m.gguf"
),
chat_handler=chat_handler,
n_ctx=4096,
n_gpu_layers=0,
verbose=False,
)
# 2. Encode your image
with open("photo.jpg", "rb") as f:
img_b64 = base64.b64encode(f.read()).decode()
# 3. Run inference
response = llm.create_chat_completion(
messages=[
{"role": "system", "content": "You are an expert photography instructor. Analyze the photograph and provide a detailed critique. Respond only with a valid JSON object."},
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{img_b64}"}},
{"type": "text", "text": "Analyse this photograph. Respond only with a JSON object."}
]
}
],
max_tokens=512,
temperature=0.1,
)
print(response["choices"][0]["message"]["content"])
Training Details
Training Data
The model was trained on dulshanbandara/rpcd-elite-5k-v4, a curated dataset derived from the Reddit Photo Critique Dataset (RPCD) via a multi-stage pipeline:
- Source: 31,983 submissions from r/photocritique with associated images and community comments
- Filtering: Top 5,000 posts selected by Reddit score (≥10) and comment count (≥3)
- Critique extraction: Top 5 upvoted human comments per post, filtered for quality
- AI synthesis: Gemma 4 31B synthesized multi-perspective human comments into structured JSON critiques with Pydantic schema enforcement
Final dataset: 3,504 image-critique pairs with structured JSON annotations.
| Metric | Value |
|---|---|
| Total samples | 3,504 |
| Score range | 2–10 |
| Mean score | 6.9 |
| Median score | 7 |
| Train / Eval split | 90% / 10% (3,153 / 351) |
Training Procedure
Preprocessing
- Images loaded lazily as PIL objects at collation time
- Conversations formatted as Qwen2-VL ChatML with system prompt, user image+text, and assistant JSON response
- Tokenization handled by Unsloth's
UnslothVisionDataCollatorfor multi-modal token alignment
Training Hyperparameters
- Training regime: FP16 mixed precision
- Optimizer: AdamW 8-bit (via
bitsandbytes) - Learning rate: 2e-4 with cosine annealing scheduler
- Warmup steps: 50
- Epochs: 3
- Total steps: 594
- Per-device batch size: 1
- Gradient accumulation steps: 16 (effective batch size = 16)
- Weight decay: 0.01
- Gradient checkpointing: Enabled (Unsloth)
- Evaluation strategy: Every 200 steps with best-model checkpoint selection
LoRA Configuration:
| Parameter | Value |
|---|---|
| Rank (r) | 16 |
| Alpha | 16 |
| Dropout | 0.0 |
| Bias | None |
| Target modules | All attention + MLP layers (vision & language) |
| Trainable parameters | 28.95M (1.29% of 2.24B total) |
Speeds, Sizes, Times
- Training duration: ~5.5 hours
- Hardware: 1× NVIDIA Tesla T4 (15 GB VRAM)
- Platform: Kaggle (free GPU tier)
- Base model loading: 4-bit (bitsandbytes NF4 quantization)
Evaluation
Testing Data, Factors & Metrics
Testing Data
10% held-out evaluation split (351 samples) from the same curated RPCD-derived dataset.
Factors
Evaluation disaggregated by training step progression to monitor convergence and overfitting.
Metrics
- Training loss — cross-entropy loss on training set
- Evaluation loss — cross-entropy loss on held-out eval set
Results
| Metric | Value |
|---|---|
| Initial train loss | 2.308 |
| Final train loss | 0.624 |
| Best eval loss | 0.656 (Step 594) |
The model shows strong convergence with eval loss closely tracking train loss, indicating minimal overfitting at 3 epochs.
Summary
The fine-tuning successfully adapted the base Qwen2-VL-2B model to produce structured photography critiques. The narrow gap between final train loss (0.624) and best eval loss (0.656) confirms good generalization without overfitting, achieved through LoRA's parameter efficiency and appropriate regularization (weight decay + gradient accumulation).
Environmental Impact
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
- Hardware Type: 1× NVIDIA Tesla T4 (15 GB VRAM)
- Hours used: ~5.5
- Cloud Provider: Kaggle (Google Cloud)
- Compute Region: Unknown (Kaggle-assigned)
- Carbon Emitted: Estimated ~0.44 kg CO₂eq (T4 TDP 70W × 5.5h × GCP carbon intensity)
Technical Specifications
Model Architecture and Objective
Architecture: Qwen2-VL (Vision-Language Model) with ViT-based vision encoder integrated into a 2.24B parameter transformer. Fine-tuned using LoRA (rank 16) on both vision and language layers.
Objective: Supervised fine-tuning (SFT) with cross-entropy loss on structured JSON critique generation, conditioned on input photographs.
Compute Infrastructure
Hardware
- Training: 1× NVIDIA Tesla T4 (15 GB VRAM) via Kaggle free tier
- Inference (deployed): Hugging Face Free CPU Space (2 vCPUs, 16 GB RAM)
Software
- Fine-tuning framework: Unsloth + Hugging Face Transformers + PEFT
- Quantization: llama.cpp (
convert_hf_to_gguf.py+llama-quantize) - Inference engine: llama-cpp-python with
Qwen2VLChatHandler - Deployment: Gradio on Hugging Face Spaces
- Dataset synthesis: Google GenAI SDK with Gemma 4 31B
Citation
BibTeX:
@misc{bandara2026qwen2vlphotocritique,
author = {Dulshan Bandara},
title = {Qwen2-VL-2B Photography Critique: A Fine-Tuned Vision-Language Model for Structured Photography Evaluation},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/dulshanbandara/qwen2vl-2b-photography-critique}
}
APA:
Bandara, D. (2026). Qwen2-VL-2B Photography Critique: A Fine-Tuned Vision-Language Model for Structured Photography Evaluation. Hugging Face. https://huggingface.co/dulshanbandara/qwen2vl-2b-photography-critique
Acknowledgements
- RPCD (Reddit Photo Critique Dataset) — Source of real-world photography critique data from r/photocritique
- Qwen2-VL by Alibaba Cloud — Base vision-language model
- Unsloth — Memory-efficient fine-tuning framework with LoRA
- Gemma 4 31B by Google DeepMind — Used for structured critique synthesis
- llama.cpp — GGUF conversion and CPU quantization toolchain
- Hugging Face — Model hosting, dataset hosting, and free inference Spaces
- Kaggle — Free T4 GPU compute for training