r/computervision • u/erik_kokalj • Oct 28 '26
Showcase [Anomaly Detection] PatchCore on Orange line 🍊
PatchCore running on orange line, trained on good oranges only 🍊
- RF-DETR (instance seg) detects every orange, ByteTrack tracks them
- Cropped orange imgs are sent to PatchCore, which compares each patch to a memory bank of normal patches → heatmap
- Each orange is inspected multiple times while it rolls around on rolling conveyor, as anomaly could be present only on one side and not the other
This is super useful in cases where anomalous data is hard to come by, and anomaly detection training requires zero defect/anomalous labels. PatchCore runs at ~100ms on Jetson Orin AGX (at ~200 images, compute time scales with training data).
513
Upvotes
24
u/Lethandralis Oct 28 '26
Does it just compare feature vectors with a database of known good oranges? And flag as anomaly if distance is high?
5
u/Paseyyy Oct 29 '26
100ms for a single PatchCore inference is rough. Given 30 oranges on the screen each frame you would need 3 seconds per frame. Any plans to speed the process up to approach real time performance?
3
u/Competitive-Bar-5882 Oct 28 '26
Is it a geometric function or machine learning?
2
u/mr_birrd Oct 28 '26
Does Roboflow now have patchcore?
2
u/Pale_Platypus_2058 Oct 29 '26
Any free sources?
1
u/Longjumping-Low-4716 Oct 29 '26
Any repo?
1
u/Ian_610 Oct 29 '26
Is there a good place to find training data (images / vidoes) for things like this
1
u/beyond-the-joystick Oct 29 '26
How do you train the model and how much data did you use?
3
u/abhasatin Oct 28 '26
<3
1
u/Senior_Tea_842 Oct 28 '26
Have you rolled out this solution to production?
1
u/MatterTraditional806 Oct 29 '26
cool! How many defective oranges did you need to train the model to recognise defects?
how did you manage to be able to not confuse defects with the orange's stem's scar?
1
u/LuxTronic 28d ago
Nice work! Great to see.
1
u/CuriousAIVillager 25d ago
People are really this wowed by patchcore?
1
u/Level_Cockroach_955 19d ago
Curious how bad the false positives get once the fruit isn't uniform.
0
u/Philipnova Oct 29 '26
When the same orange is inspected across several rotations, how do you combine the anomaly scores into one decision per tracked orange—maximum score, repeated confirmation, or something else? I’d be interested in the false-reject rate per orange, since checking more views improves surface coverage but may also give a good orange more chances to trigger an alert.
Disclosure: I’m with SingNova, a local AI hardware project. I haven’t reproduced this pipeline; this question was drafted with AI assistance.