sarkarritesh2003/clearview-backend
0
Clearview Backend
FastAPI/Gradio service behind the Clearview app: dehazes/clears a photo, detects objects (YOLOv8n), scores each for visible damage/wear, and returns both a clean enhanced image and an annotated one plus a JSON report.
Endpoints
GET /health-- liveness checkPOST /analyze-- multipart form:image(file, required)threshold(float, default 0.65) -- scuff-score cutoff for "scuffed"warn_ratio(float, default 0.75) -- fraction of threshold for "possible wear"detector(vocorregions, defaultvoc) -- kept for backward compatibility;vocnow runs YOLOv8n regardless of the namemax_boxes(int, default 25)no_dehaze(bool, default false)no_enhance(bool, default false)sharpen(float, default 0.5)
Returns JSON: { report, original_image_base64, original_image_content_type, modified_image_base64, annotated_image_base64, processing_seconds }
See the main project README for the full pipeline breakdown (dehaze.py, scuffscore.py, enhance.py, detector.py, regiondetector.py).
