Learn from the field
Images captured at Puttalam salterns across midday sun, overcast skies, low-angle light, and supplementary LED lighting.
Turning visual inspection into measurable insight.
AI-powered impurity detection and quality grading,
built for Sri Lanka’s tropical salt production.
Rooted in Puttalam. Developed at SLIIT.

EVERY CRYSTAL COUNTS
Locate salt crystals and foreign objects, with a confidence score for every detection.
Detection precision
mAP at IoU 0.5
Annotated & augmented images
Reported CPU stream rate
Reported in the research documents · 293 held-out test images View evaluation
01THE RESEARCH
Salt is made by the sun and sea. Its quality deserves more than a subjective glance.
At the salterns of Puttalam, harvested crystals are traditionally checked by hand. Inspectors look for discolouration, mineral inclusions, sand, and organic debris. Changing light, operator fatigue, and translucent crystal surfaces make consistent grading difficult.
Brinex Vision presents the computer vision component of the Integrated Climate-Intelligent Salt Production Ecosystem. The research connects object detection with per-crystal whiteness analysis, turning a camera frame into quantitative quality signals and traceable batch records.
Read the research problemTHE QUESTION BEHIND THE WORK
How can we detect impurities and grade salt crystals in real time, under the conditions of tropical production?
Locate each crystal and contaminant.
Fit within a 200 ms frame budget.
Give operators an auditable quality signal.
02THE METHODOLOGY
A complete inspection pipeline, designed around the crystals, conditions, and decisions that matter in a saltern.
Images captured at Puttalam salterns across midday sun, overcast skies, low-angle light, and supplementary LED lighting.
YOLOv8 predicts a bounding box, class, and confidence for each object. Reviewed annotations distinguish pure salt, impure salt, and foreign material.
HSV analysis measures brightness and colour neutrality inside each detection. Class weights turn whiteness into an interpretable composite score.
ONNX inference feeds a NestJS service. Results travel through gRPC and WebSocket to a Next.js dashboard, with sessions and batches saved in MongoDB.
A PURPOSE-BUILT DATASET
Training · 1,366
Validation · 293
Test · 293
Reported dataset split. Augmentations include rotation, flipping, brightness and contrast changes, noise, mosaic, and cutout.
Training uses COCO-pretrained weights, a 150-epoch budget, batch size 16, and a cosine-annealed learning rate starting at 0.01. Early stopping monitors validation performance with a patience of 20 epochs.
320 × 320 model input · confidence filtering + non-maximum suppression · selectable region of interest · asynchronous persistence
An object detector was chosen over frame-level MobileNet and ResNet classifiers because grading needs the position and pixel region of each crystal, not only a label for the whole image.
03THE GRADING FRAMEWORK
Three complementary measures turn a set of bounding boxes into a quality assessment operators can understand.
Pure / (Pure + Impure) × 100The percentage of salt detections classed as pure. Foreign objects are excluded from this denominator and reported separately.
W = mean(V × (1 − S)) × 100Within each bounding box, HSV Value captures brightness and Saturation captures colour intensity. Bright, neutral pixels score higher.
Q = W × class weightPure salt receives a weight of 1.0, impure salt 0.3, and foreign material 0.0. Per-detection scores are averaged into a frame score.
Adjust the sample to see how each measure responds.
YOUR SAMPLE, EXPLAINED
For clarity, every crystal uses the same whiteness input here. The research computes whiteness separately for each detected region, then averages the weighted scores across detections. This example does not certify a batch.
These are visual quality measures. Chemical composition, food safety, and regulatory certification require appropriate testing beyond computer vision.
04THE EVIDENCE
Evaluation reported on 293 held-out images. Each metric answers a different question about detection performance.
OVERALL DETECTION PERFORMANCE
How often a predicted detection is correct.
How many ground-truth objects are found.
Average precision at an IoU threshold of 0.5.
Average precision across stricter box alignment thresholds.
THE OPERATIONALLY CRITICAL CLASS
99.67%The report records 607 correct detections out of 609 impure crystal instances, with two missed. This class matters because overlooked impurities can pass into the final product.
| Detection class | Precision | Recall | Correct detections | Missed instances |
|---|---|---|---|---|
| Pure salt | 96.32% | 100.00% | 654 | 0 |
| Impure salt | 98.86% | 99.67% | 607 | 2 |
| Unwanted material | 92.47% | 96.43% | 270 | 10 |
Source: research report, Chapter 3, Tables 7–9. Overall metrics and class-level confusion-matrix results are reproduced as reported and have not been independently reconciled. The supplied documents alternate between YOLOv8 nano and medium, so the model variant needs confirmation before replication. On 50 expert-rated frames, the report also records a Spearman rank correlation above 0.92 between the composite score and human quality ranking.
The research prototype · Report, Figure IVBUILT AROUND THE OPERATOR
The research goes beyond a model benchmark. Its operator dashboard brings together annotated camera frames, purity indicators, quality scores, and batch history.
05THE BIGGER PICTURE
Project 25-26J-431 brings four research components together across the salt production lifecycle. Vision supplies the evidence about the harvested product.
Use weather and sensor data to anticipate when salt will crystallise.
Translate forecasts into operational plans around capacity and market conditions.
Inspect the harvested crystals and return measurable quality signals.
Explore federated learning for by-product reuse across salterns without sharing raw site data.
06LIMITATIONS & NEXT STEPS
The current work demonstrates a monitoring and grading prototype. Broader deployment brings new questions to test.
07READ THE RESEARCH
Explore the methodology, implementation, and evidence in the original documents.
DISSERTATION · 59 PAGES
Salt Crystal Impurity Detection and Quality Grading Using Real-Time Computer Vision: For Tropical Salt Production.
Arshaq MJM · SLIIT · April 2026TENCON 2026 FILE · 5 PAGES
Salt Crystal Impurity Detection and Quality Grading Using Computer Vision for Tropical Salt Production.
Methodology, results & discussionICHORA 2026 · 1 PAGE
Certificate documenting an oral presentation of the related salt production forecasting paper.
Muhammed Arshaq · ICHORA 2026Muhammed Arshaq IT22346322
Dr. Bhagya Nathali Silva & Mrs. Thilini Jayalath
Sri Lanka Institute of Information Technology