The rot is invisible. The curve is not.

An apple or a pear gives nothing away from the outside. Cut it open and you know — but the cut one cannot be sold, and the uncut ones still cannot be trusted. This customer builds fruit-and-vegetable sorting equipment, and handed the question to a spectral line: near-infrared light passes through the flesh and comes back as one curve per fruit. A model reads that curve into two numbers, sugar and rot, and the line sorts on them. The back office only has to manage four things: light, position, identity and judgement. This case takes those four apart one at a time.

Industry
Fruit and vegetable sorting and post-harvest handling (apples, pears, dates) · software bundled with sorting machines · non-destructive inspection
System type
Browser back office plus an industrial front end on the line: AI model management, camera and scanner configuration, data dashboards
Key techniques
NIR curtain curve · zip-versioned models with hot loading · tray-centre calibration by Hough circle · four pixel views · twelve sorting outlets · sixteen status lamps
Jiding role
Inspection-flow mapping, back office and dashboard build, model-management chain, calibration and go-live support
90 /minLine rate — one fruit every 0.67 seconds
2 valuesEvery inspection returns sugar (°Bx) and rot share (%)
79 recordsTraining records; filtered down to 55, each keeping its raw curve
12 outletsRot gets its own outlet, beside small, medium, large and channels 05–12

Why Not Cut

Cutting is the most accurate test, and the most expensive

Cut one open and the rot shows itself — but a cut fruit can only be thrown away, and no amount of sampling covers a whole crate. The hard part of rot detection is not seeing the disease, it is seeing it without destroying the fruit. The system answers that with three things: light that gets through, a model that reads it, and a line that can act on it.

01 · Light Light gets through

Near-infrared light enters the flesh and comes back out; rotten tissue carries different moisture and density, so it absorbs differently — the disease is written in the curve, not on the skin.

Three lamps — source, spectrometer, heat sink. Lose one and the curve goes flat.
02 · Model The model reads it

The curve goes into a trained model, which returns two numbers: sugar and rot share. The model is not hard-coded — one zip is one version, retrain and swap whenever.

Without a model loaded, the instrument is accurate and still says nothing.
03 · Position Position lines up

The camera watches the tray: white box around the tray, red circle on its centre, so the light path crosses the middle of the fruit. Shift the position and the curve picks up dirt.

Miss the tray and you measure its rim, not the fruit.
04 · Identity Identity follows

A scanner puts a barcode on every fruit; the record, the sugar, the rot and the outlet it went to all hang off that barcode, so a complaint can be walked back to one fruit.

No barcode, and data and fruit part company — traceability ends there.

The first number on the dashboard is the rate: 90 fruits a minute, one every 0.67 seconds. In those 0.67 seconds light, position, identity and judgement all have to hold — which is why every screen in the back office is really managing one of the four.

On The Line

Four numbers to read first

The dashboard is the eyes of the line. On start-up, glance at four numbers: is the rate steady, how much has this batch moved, what does one fruit weigh. Each number sits next to a status lamp — when a number looks wrong, read the lamp first.

Rate90.00fruit/minInstantaneous, one fruit every 0.67 s
Throughput8.48t/hConverted from size and weight of the shift
This batch110fruit · 10.04 tCumulative since 00:00:55
Average fruit91.29gBatch weight ÷ batch count
Line camera · live view
Line camera page: camera list on the left (HD USB Camera, HP Wide Vision, OBS Virtual, Web Camera2), live view of the tray and fruit in the middle with a white box and a red circle overlaid, calibration parameters on the right
The camera page is where “position” lives: camera list on the left, live view in the middle with a white box (detection range) and a red circle (centre alignment), every calibration parameter on the right. Pixel/FPS/ACU tick along the top — if the FPS drops, check the camera first.

The Curve

One curve, three readings

Every row in the record list has a “curve” button. It opens that one fruit's own curtain curve: 200–1000 nm across, intensity up the side. Nobody on the floor reads the formula; they read three places.

Curtain curve · single fruit200–1000 nm · interval 1 · averaged 2
NIR band · lesion rewrites peak shape Peak 1 · ~460 nm dip between Peak 2 · ~590 nm flat after 700 nm, noise only 2004006008001000 nm 230020001700 intensity
single fruitbatch reference curve (for comparison)Opened from the “curve” button in the record list, one fruit at a time
Read the positionWhere the two peaks fall depends on the variety and the spectrometer's wavelength range. If both drift together, check the lamp and integration time before suspecting the fruit.
Read the heightRotten tissue absorbs strongly, so height moves first. One fruit sitting visibly lower than its batch can be circled by eye before the model says anything.
Read the shapeHow deep the dip runs between the two peaks is the main rot feature. Labelling during training is exactly the work of turning those shape differences into learnable labels.

Two Numbers

One inspection, two numbers out

The model does not return a verdict of good or bad. It returns two numbers: sugar (°Bx) for grading, rot share (%) for rejection. Both sit side by side in every record, and each site draws its own line.

TimeBarcodeWeight (g)Sugar (°Bx)Rot (%)
11-25 14:30:51FS-004011223012.223.2
11-25 14:29:23FS-004011223015.50.3
11-25 14:27:21FS-004011223015.30.2
11-25 14:26:16FS-004011892014.90.1
11-25 13:33:291731042222987.90
Excerpt from the training records (demo data, de-identified). Two readings per fruit; the rot line is drawn by the site, variety by variety.
Threshold

Two readings, one ruler

Rot is a continuous value: 0.1–0.3% sits in the release zone, 23.2% in the reject zone. The line between them is not fixed in the software — change variety or fruit size and it has to be redrawn, which is what the training records are for.

release 0.3%0.3%
reject 23.2%23.2%
0102030%

The sugar column holds 12.2 and 87.9 — different varieties and moisture levels, completely different ranges. So models are trained and loaded per variety: change the goods on the line and confirm which zip is loaded before trusting a reading.

Find The Record

79 records, filtered to 55 in three steps

Training records are the model's food and the audit trail's evidence. A row of conditions sits above the list: time, barcode, image, spectrum, verification, AI — every one of them searchable.

BarcodeOne fruit at a time
FS-004011223
TimeRange
2025-11-25 13:26 — 14:30
ImageHas an image or not
allwithwithout
SpectrumHas a curve or not
allwith
VerificationResult of the check
alln/apendingsamedifferent
AIModel version
all
79 in total → verification “pending” → 55 to compare → open each curve, label, retrain
Training records · time filter
Training record list with the time picker open; columns are time, barcode, weight, sugar, rot and actions, 79 records
The time picker opens straight onto a calendar. Each row carries five icons: print, delete, original image, curve — and a delete always meets a confirmation dialog.

Model Files

A model is four zips; swapping one is swapping a file

There is no mystery in the “AI model” list in the sidebar: one zip, one model, dated in the name. Three versions came out on 23 October alone, and another on 24 November — training is routine, not a project.

Spectrum station · model panel
Spectrum station sidebar: start button, current AI model FL2511241425 with a load button, and three historical zips
The current model FL2511241425 stays pinned at the top, with three history versions below. Press load to hot-swap — no restart, no stopping the line.
FL2511241425.ziptrained 11-24current
FL2510231023.zip10-23 v3loadable
FL2510231000.zip10-23 v2loadable
FL2510230957.zip10-23 v1loadable
Delete a training record · confirmation
Delete confirmation dialog: whether to delete data for FS-004011223, with cancel and delete buttons
Deleting a record spells the barcode out in the dialog; the footer count then moves from 79 to 78.

Swapping a model does not stop the line: pick in the list → load → the “model” lamp turns green, a few seconds end to end. Old versions are never deleted, so if the new one misbehaves a single click takes you back — rollback is part of model management, not a rescue.

Calibration

Camera calibration: the tray is what gets calibrated, not the fruit

Fruit changes; the tray does not change every day. The camera does one job: find the centre of the tray so the light path crosses the middle of the fruit. Hough circles find it, and every parameter sits on the right-hand panel.

Camera · image views
Camera page toolbar with the image dropdown open: original, grayscale, Gaussian blur and Laplacian views
The “image” dropdown in the toolbar is the door to four views. One frame, four ways of taking it: original for the whole, grayscale for brightness, Gaussian for noise, Laplacian for edges.
ParameterValueWhat it does
Tray centre search range (white box)250Box the tray first, so the search stays inside
Centre alignment radius (red circle)10Centre inside the circle counts as aligned
Gaussian Size / SigmaX / SigmaY1 / 1 / 1Denoise strength, left at default
Hough circle Dp / MinDist / MinRadius / MaxRadius1 / 50 / 55 / 130The four numbers that find the tray centre
Averages / integration time / sampling interval2 / 20 / 1Spectrum cadence, tied to line rate
Pixels600 × 480Capture resolution

Four pixel views: check parameters with your eyes

You do not have to run a batch of fruit to know whether a parameter is right. Switch one frame through four views and see at once whether the box and the circle still sit where they should.

Original view: raw camera frame of tray and fruit
Original the whole picture: is the tray there, is the light even
Grayscale view of the same frame
Grayscale brightness: over- and underexposure show here first
Gaussian blur view of the same frame
Gaussian noise: with speckle gone, is the tray edge still stable
Laplacian edge view of the same frame
Laplacian edges: every contour the Hough search works on

Twelve Outlets

Twelve outlets, and rot gets one of its own

Where does a graded fruit go? The dashboard lays the outlets out: rot on its own outlet, small, medium and large split by diameter, channels 05–12 left to the customer's own scheme. Counts and weights accumulate live.

Rot
263
Small
848
Medium
809
Large
306
Channel 05
266
Channel 06
310
Channel 07
226
Channel 08
0
Channel 09
601
Channel 10
0
Channel 11
485
Channel 12
154
Dashboard · outlet totals
Dashboard bar chart: accumulated counts and kilograms for rot, small, medium, large and channels 05 to 12
Hover any bar to see that outlet's count and accumulated weight in kg. The rot bar is red — its count is the loss rate itself.

How outlets are split is the customer's business. The system guarantees one thing: every number on every outlet can be walked back along the barcode to that curve. When a dispute comes, open the record, show the curve, two minutes.

Status Lamps

Sixteen lamps: on start-up, look for red first

The bottom right of the dashboard holds two rows of lamps: four for the default sequence, eight for the spectral station. Whichever is red is where you look first — this is the troubleshooting order, written down.

Equipment statusDEMO RUN · 00:00:55
Default sequence
Control
Transfer
Sorting
Self-test
Spectral station
Spectrometer
Scanner
Lamp
Cooling
Model
Sampling
Camera
Training

Fifteen red and one green is a demo machine's state, but the order is real: lamp and cooling first, or the spectrometer has no spectrum; camera next, or the tray is not aligned; model green last, or the curve has no verdict. Troubleshooting starts at the lamps, not at a guess.

Back Office

Eight moves behind the line

Off the line there is a group of pages that never appear on a poster and are used every day: add a camera, add a scanner, delete a record, check a verification. Eight moves, one screen.

Thumbnail of the training record list
Recordsone row per fruit, five action icons
Image filter dropdown: all, with, without
Find imageswith or without — missing images surface at once
Verification filter dropdown: all, n/a, pending, same, different
Check resultsfive states, progress visible at a glance
Add network camera dialog: type, name, IP address, port
Add cameratype, name, IP, port — four fields
Delete network camera confirmation dialog
Remove cameraconfirmation carries the camera name
Add scanner dialog: station type, connection type network or serial, IP, port, barcode
Add scannernetwork or serial, attached to a station
Delete training record confirmation thumbnail
Delete recordbarcode written into the dialog
Curtain curve dialog thumbnail, 200 to 1000 nanometres
See the curveone per fruit, peaks and heights on record

Rollout

Four gates: no passing without the check

What an inspection system fears most is running at full speed on a model that was never tuned. Split go-live into four gates, each with a condition you can verify by eye.

Gate 01 Calibrate

Camera onto the tray: box around it, circle on its centre, four Hough parameters recorded. Scanner attached to the station, IP and port answering.

Pass when: box and circle sit right in all four pixel views.
Gate 02 Sample and label

Run slowly, one record per fruit; label sugar and rot by hand per variety, with neither the image nor the spectrum column missing.

Pass when: the “image - without” filter returns nothing and every column has a value.
Gate 03 Train and verify

Train a zip on the labelled records; only “same” in the verification column counts as usable, and every “different” goes back to its curve.

Pass when: filtering verification by “different” is empty, and the new zip carries a date.
Gate 04 Run grey

Load the new model, watch the “model” lamp turn green; run slowly for half a day until the rot outlet matches manual sampling, then go full speed.

Pass when: all sixteen lamps are green and the old zip stays in the list.

FAQ

Four questions asked before and after go-live

Q1How does the system tell a rotten fruit from a good one?
By spectrum, not by appearance. Between 400 and 1000 nm the curtain curve is a double peak; rotten tissue absorbs differently, so peak height and shape shift, and the model reads the curve into a rot share. The reject line is drawn by the site, per variety; the system's job is to record every number.
Q2What happens when the model is off?
A model is a zip, and swapping it is swapping a file. Resample, label, train a new zip, and only accept it when verification reads “same”. Old zips stay in the list, so rollback is one click. This customer shipped three versions on a single day in October — training is routine, not a project.
Q3Is camera calibration a nuisance?
The tray is what gets calibrated, not the fruit. Tray centre search 250, alignment radius 10, four Hough parameters; calibrate once and reuse it when changing fruit. Adjust a parameter and check it in the four pixel views — the box and circle tell you immediately.
Q4What is the point of keeping inspection data?
One record per fruit: time, barcode, weight, sugar, rot, plus the image (with or without), the verification state and the curve. A whole batch can be traced back from one complaint, and every delete meets a confirmation. The list went from 79 records to 78 in front of us.

MORE CASES

More Related Cases

AI core-rot detection for fruit sorting
System Integration OMAI mold detection, fruit and vegetable sorting

AI core-rot detection for fruit sorting

An apple or a pear gives nothing away from the outside. Cut it open and you know — but the cut one ...

View Details →
Environmental test chamber HMI system
System Integration OMIntelligent manufacturing, intelligent inspection

Environmental test chamber HMI system

An HMI built into the chamber panel: the industrial PC and the PAD run identical features, and the A...

View Details →
Low-altitude logistics multimodal management system
System Integration OMLow-altitude logistics, fully automated distribution

Low-altitude logistics multimodal management system

A low-altitude logistics multimodal management system for campus and community scenarios: an on-site...

View Details →

View All Cases →

Planning a similar production line or enterprise system?

Start with our pricing logic, then let's talk requirements — cost structure, technology comparison and acceptance criteria, all laid out in the open.