Droid210/FleetVision
0
1---2title: Fleet-Vision3emoji: ๐4colorFrom: blue5colorTo: green6sdk: docker7pinned: false8---9 10Fleet-Vision11=============12 13Fleet-Vision is a vehicle inspection and dispatch demo. It combines:14 15- Model A: vehicle body classification16- Model B: damage detection with heatmaps17- OpenRouteService: route distance and ETA lookup18- FastAPI: upload and dispatch endpoint19 20## Setup21 22```bash23git lfs pull24pip install -r requirements.txt25```26 27Or with Poetry:28 29```bash30poetry install31```32 33## Run34 35Start the API:36 37```bash38uvicorn api.main:app --reload39```40 41Open the app in your browser and upload the five required images plus a destination.42 43## Key files44 45- [api/main.py](api/main.py): FastAPI app and `/request-ride` endpoint46- [langchain_orchestrator.py](langchain_orchestrator.py): model and routing workflow47- [body_classifier.py](body_classifier.py): Model A wrapper48- [damage_detector.py](damage_detector.py): Model B wrapper49- [utils/routing_service.py](utils/routing_service.py): ORS routing and geocoding50 51## Model Documentation52 53For detailed Model A and Model B architectures, hyperparameters, evaluation metrics, and training guides, see [models/README.md](models/README.md).54 55## Notes56 57- Model weights are stored with Git LFS under `weights/`.58- Dataset folders live under `data/`.59 60## CI/CD: GitHub -> Hugging Face (Docker Space)61 62This repository includes a Docker-based CI/CD flow:63 64- CI workflow: `.github/workflows/ci.yml`65 - Builds the Docker image on GitHub Actions.66 - Runs a smoke test against `GET /health`.67- Deploy workflow: `.github/workflows/deploy-hf-space.yml`68 - Syncs repository content to a Hugging Face Space repo.69 - Hugging Face then builds and runs the app from `Dockerfile`.70 71### Required GitHub secrets72 73Set these in your GitHub repository settings -> Secrets and variables -> Actions:74 75- `HF_TOKEN`: Hugging Face user access token with write permission to Spaces.76- `HF_SPACE_REPO`: Space identifier in the form `username/space-name`.77 78### Required Hugging Face Space secret79 80Set this in your Hugging Face Space settings -> Variables and secrets:81 82- `ORS_API_KEY`: OpenRouteService API key used by routing service.83 84### Deploy behavior85 86- Any push to `main` triggers CI and deploy workflows.87- Deploy copies files to the Space repository and pushes a commit.88- If there are no file changes, deploy exits without creating a commit.89 