Retro Scan AI is a production-ready platform for automated road asset detection, scoring, and analytics. It leverages state-of-the-art YOLO models and a modern web dashboard to deliver actionable insights for infrastructure maintenance and compliance.
Key Benefits:
- Automated detection of road signs, markings, and studs
- Real-time scoring and compliance analytics
- Intuitive dashboard for visualization and reporting
- Robust fallback and error handling for seamless user experience
graph TD
A[User uploads image via UI] --> B[React Frontend]
B --> C[API Call: /detect]
C --> D[FastAPI Backend]
D --> E[YOLO Model Inference]
E --> F[Detection Results]
F --> D
D --> G[JSON Response]
G --> B
B --> H[Dashboard Visualization]
B --> I[Fallback: Error/Offline Handling]
Retro Scan AI/
├── backend/ # FastAPI backend and YOLO logic
│ ├── app.py # Main FastAPI app
│ ├── requirements.txt
│ └── ...
├── src/ # React frontend source code
│ ├── api/
│ ├── components/
│ ├── pages/
│ └── ...
├── public/ # Static assets
├── package.json # Frontend dependencies
└── ...
- Python 3.10+
- Node.js 18+
- (Recommended) Git
cd backend
python -m venv .venv
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app:app --reload --host 127.0.0.1 --port 8000npm install
npm run dev
# Open http://localhost:5173 in your browserDetect objects in an image:
curl -X POST "http://127.0.0.1:8000/detect" -F "file=@test.jpg" -F "speed=80"Health check:
curl http://127.0.0.1:8000/health- Open the dashboard in your browser.
- Upload a road asset image.
- View detection results, compliance status, and analytics.
GET /health— Health checkPOST /detect— Run YOLO detection on an uploaded image
- YOLO Model: The backend uses Ultralytics YOLO. Default:
yolov8n.pt. - Custom Model: Set the
YOLO_MODELenvironment variable to use a different model.
- Backend not found? Ensure the FastAPI server is running at
http://127.0.0.1:8000. - Module errors? Double-check your Python environment and installed dependencies.
- YOLO errors? Make sure the model file exists and is compatible with your Ultralytics version.
- CORS issues? The backend enables CORS for all origins by default.
Contributions are welcome! To contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature/your-feature) - Commit your changes
- Push to your fork and open a Pull Request
Please see CONTRIBUTING.md for guidelines.
Q: Can I use a custom YOLO model?
A: Yes, set the YOLO_MODEL environment variable to your model path.
Q: How do I deploy this in production?
A: Use a production server (e.g., Gunicorn with Uvicorn workers) and serve the frontend with a static file server or CDN.
Q: Where do I report bugs?
A: Please open an issue on GitHub.
This project is licensed under the MIT License.
For questions or support, please open an issue or contact the maintainer.