This folder is separate from the original FRAMED repo code. It just runs a small 3-step pipeline and prints/saves a JSON report.
- Path A (classical CV): gets deterministic metrics from OpenCV
- green coverage % (HSV mask)
- laplacian variance (texture proxy)
- canny edge density (structure proxy)
- Path B (semantic): two small pretrained models
- CLIP zero-shot scene tag (hardcoded label list)
- YOLOv8n detections (objects + boxes)
- Fusion: hardcoded rules (if/else) combine it into final report + notes
From repo root:
pip install -r moiz_kashif_csc481_final/requirements.txtRun 1 image:
python moiz_kashif_csc481_final/pipeline.py --image "path/to/img.jpg" --out_dir moiz_kashif_csc481_final/sample_outputsRun a folder:
python moiz_kashif_csc481_final/pipeline.py --input_dir moiz_kashif_csc481_final/dataset/success_cases --out_dir moiz_kashif_csc481_final/sample_outputsFor each image, the pipeline writes:
*.json– full report (Path A metrics, CLIP, YOLO, quality_grade, timing)*.slim.json– compact slide-friendly summary*_green_mask.png– HSV green mask (vegetation pixels)*_edges.png– Canny edge map (structure)*_hud.jpg– visual HUD overlay (YOLO boxes, CLIP scene, LapVar/edges, PASS/REVIEW/REJECT)
When running on a folder (--input_dir), a simple CSV is also written:
master_culling_report.csvin theout_dir, with columns:filename,quality_grade,scene,laplacian_variance,edge_density_tuned,primary_subject
Run the deterministic CV-only tests (fast, no model downloads):
pytest -q moiz_kashif_csc481_final/testsRun the optional CLIP+YOLO integration test (may download weights/models on first run):
RUN_SEMANTICS_TESTS=1 pytest -q moiz_kashif_csc481_final/tests/test_pipeline_schema_optional.py- YOLO uses
yolov8n.ptand will auto-download it on first run. - CLIP labels are fixed inside
semantics_utils.py(so its not open ended).