Detects Defects, Ensures Quality, Accelerates Innovation
Built with the tools and technologies:
- Overview
- Features
- Tech Stack
- Project Structure
- Getting Started
- Model
- Analytics
- Export Options
- License
- Author
- Screenshots
PackInspect is a low-code visual inspection tool built using TensorFlow and Streamlit. It allows users to detect defects in bottle images (or similar packaging components) by uploading images or capturing them via webcam.
It's designed to streamline quality assurance in smart manufacturing, reduce manual errors, and provide real-time feedback using deep learning.
-
📤 Upload or Capture Images
Choose between uploading images or capturing directly using a webcam. -
🤖 AI-Based Classification
Classifies images asGoodorDefectusing a pre-trained Keras model. -
📈 Confidence Display
Shows prediction confidence scores for transparency. -
🧾 Detection History Log
View recent predictions with timestamps and export results to CSV. -
📊 Pie Chart Summary
Visual overview of detection distribution (Good vs. Defect). -
🧪 Interactive Sidebar
Includes collapsible guides, model info, and accuracy stats.
- Frontend/UI: Streamlit, HTML/CSS (Custom Styling)
- Machine Learning: TensorFlow + Keras
- Image Processing: OpenCV, Pillow
- Data Handling: NumPy, Pandas
- Visualization: Streamlit charts
packinspect-anomaly-detector/
├── app.py # Main Streamlit application
├── models/
│ └── keras_model.keras # Pre-trained ML model
├── data/
│ └── labels.txt # Contains 'Good' and 'Defect'
├── assets/
│ └── overview_dataset.jpg # Sidebar visual banner
├── requirements.txt # Python dependencies
├── logs/
│ └── defect_log.csv # Detection history log
└── README.md # Project documentation (this file)
git clone https://github.com/devaldaki3/packinspect-anomaly-detector.git
cd packinspect-anomaly-detectorpip install -r requirements.txtstreamlit run app.pyOpen your browser at http://localhost:8501
The application uses a binary classification model trained using the included train_model.py script and exported in .keras format.
- Input shape: 224x224 RGB
- Output: Sigmoid (binary classification)
- Classes: Good, Defect
- Pie chart showing Good vs. Defect count
- Optional: Extend with bar graphs or trend charts using Streamlit/Pandas
- ✅ Download detection history as a CSV report
This project is licensed under the MIT License. You can use, modify, and distribute it freely with proper attribution.
Developed with ❤️ by @devaldaki3
Feel free to contribute, raise issues, or suggest improvements.

