PRODuct EXamination & Analysis
An image-processing-based system for detecting, classifying, counting and statistically analyzing supermarket products from images.
PRODEXA (PRODuct EXamination & Analysis) is an image processing based smart supermarket product identification system developed for EC9570: Digital Image Processing, Department of Computer Engineering, University of Jaffna.
The system is designed to transform a supermarket basket or product-layout image into structured product information by combining image acquisition, image preprocessing, product segmentation, object detection, product classification, counting and statistical analysis.
The overall objective is to demonstrate how Digital Image Processing and Computer Vision techniques can be integrated into a practical smart-checkout-oriented application.
Given an image of a supermarket basket / product layout, the system:
- Preprocesses the image (noise removal, resizing, normalization)
- Detects and segments individual products
- Classifies each product into a category
- Generates a statistical summary report (counts, percentages, charts)
- Displays results as labeled bounding boxes on the image and/or console output
Real-time capture is not used; the system works on pre-collected / manually captured images.
All processing is performed locally (no cloud APIs).
| Feature | Description |
|---|---|
| πΌοΈ Image Acquisition | Accepts supermarket basket and product-layout images |
| βοΈ Preprocessing | Resizing, noise removal, normalization and color-space processing |
| π― Product Segmentation | Separates product regions from the background |
| π Object Detection | Identifies individual product regions using image-processing techniques |
| π·οΈ Product Classification | Assigns detected products to predefined categories |
| π’ Product Counting | Calculates total and category-wise product counts |
| π Statistical Analysis | Generates category percentages and distribution information |
| π Visualization | Supports bar charts and pie charts |
| π·οΈ Annotated Output | Displays detected products using bounding boxes and labels |
| π Local Processing | Performs processing locally without cloud-based inference |
The main objectives of Prodexa are to:
- Develop an image-processing-based supermarket product identification pipeline.
- Apply preprocessing techniques to improve image quality and consistency.
- Isolate individual products from supermarket images.
- Detect product regions using segmentation and object-detection techniques.
- Classify detected products into meaningful categories.
- Calculate total and category-wise product counts.
- Generate statistical summaries and visualizations.
- Evaluate classification performance against the required accuracy target.
- Demonstrate modular and collaborative software development using GitHub.
RPC: Retail Product Checkout Dataset
(Wei et al., 200 SKUs across 17 meta-categories, ~83,739 images, COCO-format bounding box annotations, ~20GB).
The dataset contains two main image types:
Single-product images captured against a clean/plain background and from multiple viewing angles.
Purpose:
- Training the classification module
- Validating the classification module
- Extracting product-level visual characteristics
Images containing multiple products placed on a checkout tray with different levels of visual clutter.
The checkout images include:
- Easy - 3-5 categories / 3-10 instances
- Medium
- Hard
These images are used for testing:
- Product detection
- Product segmentation
- Full end-to-end pipeline performance
Classification targets the dataset's 17 meta-categories (e.g. bottle-like, box-like, canister-like, bag-like) rather than all 200 fine-grained SKUs.
These categories are visually distinguishable by shape, color and texture and are therefore better suited to a classical image-processing pipeline within the project's scope.
Due to the 12-hour project limit, a curated subset of the complete dataset is used rather than the entire dataset.
The project uses:
- A sample of exemplar images per meta-category for classification training/testing
- Easy-difficulty checkout images for detection, segmentation and the full pipeline demonstration
Higher clutter levels involve heavy occlusion, which conflicts with the assignment's "clearly separated products preferred" scope.
Note: The complete dataset (~20GB) is not stored in this repository. See Getting the Dataset.
ββββββββββββββββββββββββ
β Input Image β
β Basket / Layout β
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β Image Acquisition β
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β Preprocessing β
β Resize β’ Denoise β
β Normalize β’ HSV β
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β Segmentation β
β Thresholding β
β Morphology β
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β Object Detection β
β Contours β’ Filtering β
β Bounding Boxes β
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β Feature Extraction β
β Color β’ Shape β
β Texture β
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β Classification β
β SVM / KNN β
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β Counting & Statisticsβ
β Counts β’ Percentages β
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β Final Visualizationβ
β Labels β’ Boxes β’ β
β Charts β’ Summary β
ββββββββββββββββββββββββ
Raw Image
β
Preprocessing
β
Segmentation
β
Product Detection
β
Feature Extraction
β
Classification
β
Product Counting
β
Statistical Analysis
β
Annotated Output + Charts
| Member | Modules Owned |
|---|---|
| De Costa M.S.M. | Image Acquisition & Preprocessing, Product Classification |
| Senarathna S.A.D.H.D. | Object Detection & Segmentation, Statistical Analysis & Report Generation |
MEMBER 01
β
Image Acquisition
β
Preprocessing
β
βΌ
MEMBER 02
β
Segmentation
β
Object Detection
β
Product Crops
β
βΌ
MEMBER 01
β
Feature Extraction
β
Classification
β
βΌ
MEMBER 02
β
Product Counting
β
Statistical Analysis
β
Report Generation
This modular division allows both members to work independently while maintaining clear interfaces between the system components.
- Resizing
- Gaussian / median blur
- Color-space conversion
- Lighting normalization
- Image normalization
- Thresholding
- HSV-based background masking
- Morphological operations
- Contour detection
- Contour-based object detection
- Contour-area filtering
- Bounding-box extraction
- Product-region isolation
- Color features
- Shape features
- Texture features
- (Fill in once decided: handcrafted features + ML classifier, or pretrained CNN feature extractor + shallow classifier with justification, since pretrained models must be explained as required by the assignment)
The system generates:
- Total product count
- Category-wise product counts
- Percentage distribution
- Bar charts
- Pie charts
PRODEXA/
β
βββ README.md
βββ LICENSE
βββ requirements.txt
βββ .gitignore
β
βββ assets/
β βββ prodexa-logo.png
β
βββ data/
β βββ raw/ # RPC dataset subset - git-ignored
β βββ annotations/ # COCO-format bounding box JSON - git-ignored
β βββ processed/ # Preprocessed images
β βββ dataset/ # Cropped product images organized by meta-category
β βββ dataset_subset.txt # Exact files used from the full RPC dataset
β
βββ notebooks/
β
βββ src/
β βββ acquisition/
β βββ preprocessing/
β βββ segmentation/
β βββ detection/
β βββ features/
β βββ classification/
β βββ analytics/
β βββ visualization/
β βββ pipeline/
β
βββ models/ # Trained classifier artifacts
β
βββ outputs/
β βββ annotated_images/ # Bounding boxes + labels
β βββ reports/ # Summary tables / charts
β
βββ docs/ # Documentation
β
βββ tests/ # Module-level tests
Prodexa follows a modular architecture where each component has a clearly defined responsibility.
Acquisition
β
βΌ
Preprocessing
β
βΌ
Segmentation
β
βΌ
Detection
β
βΌ
Feature Extraction
β
βΌ
Classification
β
βΌ
Analytics
β
βΌ
Visualization
The final integration layer connects these modules into a single end-to-end processing pipeline.
For every processed supermarket image, Prodexa aims to provide:
PRODEXA ANALYSIS
Total Products Detected: 6
Category Count %
----------------------------------------
Category A 2 33.33%
Category B 2 33.33%
Category C 1 16.67%
Category D 1 16.67%
----------------------------------------
Total 6 100.00%
----------------------------------------
The system can additionally generate:
- Category distribution bar chart
- Category distribution pie chart
- Annotated product image
- Classification evaluation results
The classification module will be evaluated using an independent test set.
Classification Accuracy
Accuracy =
Correct Predictions
ββββββββββββββββββββ Γ 100
Total Predictions
Classification accuracy β₯ 80%
Additional evaluation metrics may include:
- Precision
- Recall
- F1-score
- Confusion matrix
| Metric | Value |
|---|---|
| Classification accuracy | TBD (target β₯ 80%) |
| Categories | TBD |
| Test images | TBD |
EC9570 - Digital Image Processing
Department of Computer Engineering Faculty of Engineering University of Jaffna
This project is developed as part of the EC9570 Digital Image Processing coursework.
Prodexa
From Pixels to Product Insights.
EC9570 β’ Digital Image Processing β’ University of Jaffna
