I have recently gained interest over this machine learning topic about image classification.
I am in no way a programmer, but I am a farmer who is very interested about it, and detecting the quality of fruits and vegetables is a very tedious and time consuming task, specially if you don't have the money to buy industrial machinery to perform this task at a small-medium scale.
I recently came across this tutorial (had to fix a lot of errors because it is really bad written, but it works):
Which basically is the building block of a future fruit/vegetable quality grader.
This conveyor belt is going to have an Arduino that will receive an output from the Python program, that output should activate servos to redirect each fruit/vegetable to its own basket.
Now I would like to know how can I get the label output from the net and transform it to a number for example:
apple = 1, orange = 2, cucumber = 3...
So whenever it's apple, Arduino receives a 1 that will light an LED (first this, then servo), same happens for orange and cucumber and so on.
Here are the 2 codes I believe have to do something with the box label output Deploy.py and yolo_net.py
Deploy.py is the one I run to get the live camera detector:
And this is yolo_net.py (if it helps somehow to answer my question):