{"slug": "grading-tomatoes-with-an-esp32-and-ml", "title": "Grading Tomatoes with an ESP32 and ML", "summary": "Pmalfa31 developed a tomato grading system using an ESP32 and machine learning that sorts standard and cherry tomatoes by color and size, with a web simulator available for testing. The system uses two learned datasets, processes optical sensor data, and includes heuristic validity checks to reduce miscategorizations.", "body_md": "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](https://github.com/pmalfa31-svg/Tomato-Grading-ML).\n\nThe 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.\n\nOne 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.\n\nThe 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](https://wokwi.com/projects/471166580602582017), so you don’t even need any hardware or tomatoes to try it.\n\nComputers have lots of uses on [a modern farm](https://hackaday.com/2026/01/16/diy-full-stack-farm-automation/).", "url": "https://wpnews.pro/news/grading-tomatoes-with-an-esp32-and-ml", "canonical_source": "https://hackaday.com/2026/08/08/grading-tomatoes-with-an-esp32-and-ml/", "published_at": "2026-08-08 20:00:23+00:00", "updated_at": "2026-08-09 12:41:52.931780+00:00", "lang": "en", "topics": ["machine-learning", "artificial-intelligence"], "entities": ["Pmalfa31", "ESP32"], "alternates": {"html": "https://wpnews.pro/news/grading-tomatoes-with-an-esp32-and-ml", "markdown": "https://wpnews.pro/news/grading-tomatoes-with-an-esp32-and-ml.md", "text": "https://wpnews.pro/news/grading-tomatoes-with-an-esp32-and-ml.txt", "jsonld": "https://wpnews.pro/news/grading-tomatoes-with-an-esp32-and-ml.jsonld"}}