{"id":30290677,"url":"https://github.com/suredream/vehicle_color_challenge","last_synced_at":"2025-08-16T23:53:31.378Z","repository":{"id":309277680,"uuid":"1035608869","full_name":"suredream/vehicle_color_challenge","owner":"suredream","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-11T00:21:34.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-11T01:12:17.186Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/suredream.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-10T18:57:24.000Z","updated_at":"2025-08-11T00:21:37.000Z","dependencies_parsed_at":"2025-08-11T01:12:18.564Z","dependency_job_id":"86357120-37d4-46f2-ab19-c451e56fe537","html_url":"https://github.com/suredream/vehicle_color_challenge","commit_stats":null,"previous_names":["suredream/vehicle_color_challenge"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/suredream/vehicle_color_challenge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suredream%2Fvehicle_color_challenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suredream%2Fvehicle_color_challenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suredream%2Fvehicle_color_challenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suredream%2Fvehicle_color_challenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suredream","download_url":"https://codeload.github.com/suredream/vehicle_color_challenge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suredream%2Fvehicle_color_challenge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270786441,"owners_count":24644563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-16T23:53:30.314Z","updated_at":"2025-08-16T23:53:31.348Z","avatar_url":"https://github.com/suredream.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vehicle Color Detection Challenge\n\nThis repository provides somethoughts to generate the required challenge outputs:\n\n## 1. Codebase Environment\n\nOpen `vehicle_color_challenge.ipynb` in colab, run the cells in the order to prepare the environment\n\n## 2. Approach overview: heuristics and openclip intergration\n\n### **Heuristic Approach**\n\n- **Advantages**\n  \n- Very fast, no extra training needed.\n  \n- Easy to implement and tune thresholds.\n  \n- Works offline without additional labeled data.\n  \n- **Disadvantages**\n  \n- Struggles with edge cases (e.g., shadows, glare, multi-colored vehicles).\n  \n- Limited adaptability to new environments without manual rule changes.\n  \n- Performance heavily depends on image conditions.\n  \n\n```\n# processing\n!python main.py --images /content/data --labels /content/data --out out --config configs/dev.yaml\n\n# Validation checks:\n# - one thumbnail per label and vice versa\n# - numeric ranges for normalized fields\n# - allowed enums for `color` and `type`\n\n!python tools/validate_outputs.py out\n\n# generate a layout png for easy visual check\n!python tools/validate_check.py out\n\n```\n\n### **OpenCLIP Integration**\n\n- The OpenCLIP model and prompts are zero-shot, meaning no fine-tuning is required.\n  \n- Classification accuracy can be improved by refining text prompts or using larger OpenCLIP variants.\n  \n\n```bash\n# Conduct zero-shot classification using openclip:\n%cd /content/vehicle_color_challenge\n!python tools/apply_lite_openclip.py --overwrite-metrics\n\n# Review changes in CSV:\nhead out/clip_summary.csv\n\n# Generate comparison visualization:\n# visiualize the results which are different from the Heuristic\n%cd /content/vehicle_color_challenge\n!python tools/validate_compare.py \n\n\n```\n\n### light classifier with ReDet and ROI header\n\n`src/ReDet_roi_classifier.py` implements a research-oriented pipeline for vehicle analysis using the MMRotate\n\nlibrary. It is designed to first detect vehicles with oriented bounding boxes using a pre-trained model (like ReDet) and then extract internal deep features from the model's Region of Interest (RoI) head.\n\nThe core idea is that these deep features are a richer, more robust representation of the vehicles than raw pixels, making them ideal for training lightweight downstream classifiers for tasks like color and type identification.\n\nHowever, this script requires a full, correctly installed MMRotate environment and the corresponding model configuration and checkpoint files to run, which requires more time to handle and not fully implemented yet.\n\nThe ROI header approach remains a superior strategy for building a production-grade, high-accuracy computer vision system.\n\nPlease check `src/ReDet_roi_classifier.py` for more details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuredream%2Fvehicle_color_challenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuredream%2Fvehicle_color_challenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuredream%2Fvehicle_color_challenge/lists"}