Computer vision for a better salt industry

A clearer view.
A better grade of salt.

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.

Inside the inspection Recorded research example
Actual research frame with bounding boxes around four pure crystals, three impure crystals, and four unwanted objects
PUTTALAM, SRI LANKAResearch report · Figure XI

EVERY CRYSTAL COUNTS

Three classes.
One clear picture.

Locate salt crystals and foreign objects, with a confidence score for every detection.

Pure salt04
Impure salt03
Unwanted material04
Per-crystal localisation Multi-parameter grading Batch-level traceability
99.41%

Detection precision

99.37%

mAP at IoU 0.5

1,952

Annotated & augmented images

5 FPS

Reported CPU stream rate

Reported in the research documents · 293 held-out test images View evaluation

01THE RESEARCH

An age-old industry. A new way to see it.

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 problem

THE QUESTION BEHIND THE WORK

How can we detect impurities and grade salt crystals in real time, under the conditions of tropical production?
See the detail

Locate each crystal and contaminant.

Keep up with production

Fit within a 200 ms frame budget.

Make the result useful

Give operators an auditable quality signal.

02THE METHODOLOGY

From field data to actionable insight.

A complete inspection pipeline, designed around the crystals, conditions, and decisions that matter in a saltern.

01

Learn from the field

Images captured at Puttalam salterns across midday sun, overcast skies, low-angle light, and supplementary LED lighting.

~650 originals → 1,952 with augmentation
02

Find every object

YOLOv8 predicts a bounding box, class, and confidence for each object. Reviewed annotations distinguish pure salt, impure salt, and foreign material.

3 classes · Label Studio + CVAT
03

Measure the quality

HSV analysis measures brightness and colour neutrality inside each detection. Class weights turn whiteness into an interpretable composite score.

Purity + whiteness + weighted quality
04

Connect the evidence

ONNX inference feeds a NestJS service. Results travel through gRPC and WebSocket to a Next.js dashboard, with sessions and batches saved in MongoDB.

Detect → grade → persist → visualise

A PURPOSE-BUILT DATASET

Designed to learn.
Kept separate to evaluate.

70%

Training · 1,366

15%

Validation · 293

15%

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.

The system architecture
Camera frame
Sharp preprocessing
YOLOv8 / ONNX
HSV grading
NestJS + MongoDB
Next.js dashboard

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

Detection is only the beginning.

Three complementary measures turn a set of bounding boxes into a quality assessment operators can understand.

01 / PURITY

How much of the salt looks clean?

Pure / (Pure + Impure) × 100

The percentage of salt detections classed as pure. Foreign objects are excluded from this denominator and reported separately.

02 / WHITENESS

How bright and neutral is it?

W = mean(V × (1 − S)) × 100

Within each bounding box, HSV Value captures brightness and Saturation captures colour intensity. Bright, neutral pixels score higher.

03 / COMPOSITE QUALITY

What does that mean together?

Q = W × class weight

Pure 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.

Try the grading modelInteractive example

Adjust the sample to see how each measure responds.

YOUR SAMPLE, EXPLAINED

70.4/ 100
Composite quality score
Detection-based purity80.0%
Whiteness input90%

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

Measured, not assumed.

Evaluation reported on 293 held-out images. Each metric answers a different question about detection performance.

Explore the evaluation

OVERALL DETECTION PERFORMANCE

Precision99.41%

How often a predicted detection is correct.

Recall99.14%

How many ground-truth objects are found.

mAP@0.599.37%

Average precision at an IoU threshold of 0.5.

mAP@0.5:0.9579.95%

Average precision across stricter box alignment thresholds.

THE OPERATIONALLY CRITICAL CLASS

99.67%

Recall for impure salt.

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.

98.86% impure-salt precision ~45 ms synchronous pipeline reported
Class-level results reported in the research
Detection classPrecisionRecallCorrect detectionsMissed instances
Pure salt96.32%100.00%6540
Impure salt98.86%99.67%6072
Unwanted material92.47%96.43%27010

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.

Research prototype dashboard showing a salt inspection frame, class detections, a purity gauge, and batch statisticsThe research prototype · Report, Figure IV

BUILT AROUND THE OPERATOR

Insight that reaches
the people who need it.

The research goes beyond a model benchmark. Its operator dashboard brings together annotated camera frames, purity indicators, quality scores, and batch history.

  • Confidence and class overlays on each frame
  • Session and batch records for traceability
  • Region of interest for focused inspection
  • Reporting and historical quality analysis
Explore the implementation

05THE BIGGER PICTURE

One vision. A connected ecosystem.

Project 25-26J-431 brings four research components together across the salt production lifecycle. Vision supplies the evidence about the harvested product.

01

Crystallisation forecasting

Use weather and sensor data to anticipate when salt will crystallise.

02

Intelligent production planning

Translate forecasts into operational plans around capacity and market conditions.

THIS RESEARCH

Computer vision quality control

Inspect the harvested crystals and return measurable quality signals.

04

Waste valorisation

Explore federated learning for by-product reuse across salterns without sharing raw site data.

Shared at ICHORA 2026. The supplied certificate records Muhammed Arshaq’s oral presentation of the related ecosystem paper, “From Pond to Market: A Two-Stage AI Forecasting System for Salt Production Planning in Puttalam, Sri Lanka.”

06LIMITATIONS & NEXT STEPS

Good research leaves room to grow.

The current work demonstrates a monitoring and grading prototype. Broader deployment brings new questions to test.

The training and test images come from one geographic area. Different salterns may have different crystal shapes, mineral compositions, and contaminants. Multi-region datasets, per-site calibration, and evaluation are needed before assuming the same performance elsewhere.

07READ THE RESEARCH

The detail behind the vision.

Explore the methodology, implementation, and evidence in the original documents.

DISSERTATION · 59 PAGES

The complete research report

Salt Crystal Impurity Detection and Quality Grading Using Real-Time Computer Vision: For Tropical Salt Production.

Arshaq MJM · SLIIT · April 2026

TENCON 2026 FILE · 5 PAGES

The research manuscript

Salt Crystal Impurity Detection and Quality Grading Using Computer Vision for Tropical Salt Production.

Methodology, results & discussion

ICHORA 2026 · 1 PAGE

The presentation certificate

Certificate documenting an oral presentation of the related salt production forecasting paper.

Muhammed Arshaq · ICHORA 2026
VISION COMPONENT RESEARCHER

Muhammed Arshaq IT22346322

SUPERVISION

Dr. Bhagya Nathali Silva & Mrs. Thilini Jayalath

INSTITUTION

Sri Lanka Institute of Information Technology

A clearer picture.
A more informed decision.

Go deeper into the research