--- title: APDS - Automated Pavement Distress System emoji: 🏗️ colorFrom: blue colorTo: indigo sdk: streamlit sdk_version: 1.35.0 app_file: app.py pinned: false license: mit --- # 🏗️ APDS: Automated Pavement Distress System An AI-powered Road Damage Assessment system using YOLOv11s & SAHI to detect potholes and cracks with high precision. Featuring a Streamlit dashboard for real-time analysis, it provides engineering reports based on IRC standards. Integrated with RAG technology to offer expert maintenance consulting derived from civil engineering manuals. ## 🚀 Key Features - **Multi-Task YOLOv11s**: Dual-purpose detection for potholes and longitudinal/transverse cracks. - **Precision Boost (SAHI)**: Slicing Aided Hyper Inference for detecting micro-cracks in high-resolution field photography. - **Civil Engineering Reports**: Automated calculation of repair materials and standard-compliant maintenance recommendations. - **AI Expert Consultant (RAG)**: Retrieval-Augmented Generation using IRC engineering manuals to provide grounded, professional advice. - **Interactive Dashboard**: Full suite of tools including Model Comparison, Video Analysis, and Field Camera simulators. ## 🛠️ Installation & Setup 1. **Clone the repository**: ```bash git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git cd YOUR_REPO_NAME ``` 2. **Install Dependencies**: ```bash pip install -r requirements.txt ``` 3. **Set up Environment Variables**: Create a `.env` file in the root directory and add your Gemini API Key: ```env GOOGLE_API_KEY=your_api_key_here ``` 4. **Add Model Weights**: Ensure your `.pt` files are placed in the `models/` directory structure: - `models/crack_detector_v12/best.pt` - `models/pothole_v1/best.pt` - `models/pothole_v2/best.pt` (Experiment V2) 5. **Run the App**: ```bash streamlit run app.py ``` ## 📂 Project Structure Following high-level professional standards, this project is organized as a modular package: - **`app.py`**: The main entry point for the Streamlit application. - **`apds/`**: The core package containing the detection engine, geospatial logic, and AI consultant bridge. - **`models/`**: Centralized storage for trained weights and performace validation artifacts. - **`docs/`**: Indian Road Congress (IRC) engineering manuals used by the RAG system. - **`tests/`**: Unit testing suite for core components. - **`scripts/`**: Development and historical training scripts. ## 📊 Methodology This project utilizes **SAHI** to overcome the limitations of standard object detectors on small, narrow distresses like cracks. By tiling images during inference, we maintain resolution and capture the fine textures required for accurate road distress classification. ## 📜 License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.