Grading Tomatoes With An ESP32 And ML

If you’ve ever worked with produce, you might know about grading. In addition to deciding if, say, a strawberry is good or not, they also have to sort them by color. Turns out, you don’t care if one package of berries is a bit redder than another, but you do care if one package has too much color variation. [Pmalfa31] applied an ESP32 and machine learning to grading tomatoes.

The system knows in advance if you are processing standard tomatoes or cherry tomatoes and uses two different sets of learned data depending on which you select. The program receives raw data from an optical sensor and then processes it to remove empty belt images, compute statistical information, and group readings for a single fruit together.

One thing we liked was the program’s heuristic checking of validity. It knows the approximate size of the tomato, so the code notes if the fruit seems too big for a cherry tomato or too small for a standard tomato. This reduces, but doesn’t eliminate, miscategorizations.

The code is a stack hog, so the program has to request a much larger stack. If you want to try it yourself, there is a simulator on the web available, so you don’t even need any hardware or tomatoes to try it.

Computers have lots of uses on a modern farm.

One thought on “Grading Tomatoes With An ESP32 And ML

  1. The code is a stack hog, so the program has to request a much larger stack.

    It’s not the code’s fault that coder is a jabroni who though Zed Shaw can replace actual university education in CS.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.