A user-friendly web application for detecting defects on painted surfaces using live webcam input and image uploads.
The Painted Surface Defect Detection App offers real-time defect detection for painted surfaces using a webcam, as well as the ability to upload images for defect detection and severity classification. The application is hosted on PythonAnywhere and utilizes both Django and Flask to provide a comprehensive solution.
- Live Defect Detection: Start and stop real-time defect detection using your webcam.
- Image Upload Detection: Upload an image to detect defects and classify their severity.
- Real-Time Feedback: Instant feedback on detected defects.
- User-Friendly Interface: Simple and intuitive controls for both live detection and image uploads.
- Integration: Combines Django for the main application with Flask for live detection functionality.
- Python 3.x
- Django
- Flask
- Virtual environment tools (virtualenv, pipenv, etc.)
-
Clone the repository:
git clone https://github.com/NakulLimbani/Painted_Surface_Defect_Detection_App.git cd Painted_Surface_Defect_Detection_App
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Run database migrations:
python manage.py migrate
-
Start the development server:
python manage.py runserver
-
Start the Flask server:
python app_flask.py # Ensure this script starts the Flask server
-
Live Detection:
- Navigate to the homepage to access live detection.
- Click on the Start Detection button to begin real-time defect detection using your webcam.
- Click on the Stop Detection button to halt the live defect detection.
-
Image Upload Detection:
- Use the Upload Image section on the homepage to select and upload an image.
- The application will detect defects in the uploaded image and classify their severity.
- Review the results displayed on the page after the analysis is complete.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature-name
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.