Spaces:
Sleeping
Sleeping
| .PHONY: setup detect export finetune clean app help | |
| PYTHON := python | |
| UV := uv | |
| DATA_RAW := data/raw | |
| DATA_DET := data/detections | |
| DATA_LAB := data/labeled | |
| help: | |
| "autolabel — OWLv2 labeling pipeline" | |
| "" | |
| "Targets:" | |
| " setup Install dependencies" | |
| " app Launch the Gradio UI (primary workflow)" | |
| " detect Run OWLv2 batch detection via CLI → data/detections/" | |
| " export Build COCO JSON from data/labeled/ via CLI" | |
| " finetune Fine-tune OWLv2 via CLI (future use)" | |
| " clean Remove generated JSON files (raw images untouched)" | |
| setup: | |
| $(UV) sync | |
| -n .env.example .env 2>/dev/null || true | |
| "Done. Run: make app" | |
| app: | |
| PYTORCH_ENABLE_MPS_FALLBACK=1 $(UV) run python app.py | |
| detect: | |
| $(UV) run python scripts/run_detection.py \ | |
| --image-dir $(DATA_RAW) \ | |
| --output-dir $(DATA_DET) | |
| export: | |
| $(UV) run python scripts/export_coco.py \ | |
| --labeled-dir $(DATA_LAB) \ | |
| --output $(DATA_LAB)/coco_export.json | |
| finetune: | |
| PYTORCH_ENABLE_MPS_FALLBACK=1 $(UV) run python scripts/finetune_owlv2.py \ | |
| --coco-json $(DATA_LAB)/coco_export.json \ | |
| --image-dir $(DATA_RAW) | |
| clean: | |
| "Removing generated files..." | |
| find $(DATA_DET) -name "*.json" -delete 2>/dev/null || true | |
| find $(DATA_LAB) -name "*.json" -delete 2>/dev/null || true | |
| "Done. Raw images in $(DATA_RAW) are untouched." | |