An AI-powered full-stack web application for automatic road crack detection and mapping using drone-captured images.
- Upload drone images via a modern web dashboard
- Automatic crack segmentation using a pretrained U-Net (ResNet34) model
- GPS extraction from image EXIF metadata
- Overlay of detected cracks on the original image
- Interactive map with GPS marker and overlay preview
- Responsive, modern UI (React + TailwindCSS)
- Frontend: React, Vite, TypeScript, TailwindCSS, Axios
- Backend: FastAPI, Python, segmentation-models-pytorch, OpenCV, Pillow, Folium, ExifRead
- Model: U-Net (ResNet34 encoder), trained on DeepCrack dataset
Drone Based/
├── backend/
│ ├── main.py
│ ├── utils.py
│ ├── model_loader.py
│ ├── models/
│ │ └── unet_deepcrack_best.pth
│ ├── static/
│ ├── maps/
│ ├── uploads/
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── UploadForm.tsx
│ │ │ ├── ResultPreview.tsx
│ │ │ └── MapViewer.tsx
│ │ ├── App.tsx
│ │ └── main.tsx
│ ├── index.html
│ ├── tailwind.config.js
│ └── package.json
└── README.md
- Install Python 3.8+ and pip.
- Create and activate a virtual environment:
cd backend python -m venv venv venv\Scripts\activate # On Windows # or source venv/bin/activate # On Mac/Linux
- Install dependencies:
pip install -r requirements.txt
- Place your trained model at
backend/models/unet_deepcrack_best.pth. - Start the backend server:
The API will be available at http://localhost:8000.
uvicorn main:app --reload
- Install Node.js (v18+) and npm
- Install dependencies:
cd frontend npm install - Start the frontend dev server:
The app will be available at http://localhost:5173.
npm run dev
- Open http://localhost:5173 in your browser.
- Upload a drone image (with GPS EXIF data).
- View the detected cracks, GPS coordinates, and interactive map.
- The backend must be running for the frontend to work.
- Only images with GPS EXIF metadata will show a map location.
- For best results, use high-quality drone images.
This project is for academic/research use. Contact the author for other uses.