- automatic trash separator using yolo
- Before explaining, this is my Capstone Design Results.
- Garbage is being dumped indiscriminately(thoughtless) on the campus.
- If it is thrown away without recycling, it will take a lot of time and manpower to classify it, so recycling is not possible now.
- So we developed the Trash Detector that encourages students to throw garbage into trash cans.
- Raspberry 3b+
- Motor Driver - pca9685
- Servo moter - mg996r
- Unused smartphone - samsung galaxy s7
- Raspbian OS
- python 3.6
- Opencv
- MTCNN
- First, We receive a full face video from the user, which is about 10 to 20 seconds.
- Second, in per_frame_video.py, we can split the video into a frame and save it as an image. This becomes train dataset.
- Third, in boxing.py, The mtcnn module produces an xml file whith store facial coordinates and multiple information in all images.
- The xml file is not appropriate because we are going to use yolo. Therefore, convert all xml files into txt files, i.e. yolo format. (in xml_to_yolo.py)
- And then, we already construct train dataset(face dataset), train it!
- We collected 4,000 images from the kagle, 2,000 images from the local dataset taken by ourselves, and 2,000 images from the coil dataset to form the garbage dataset.
- So, I labelled all 8,000 images myself.
- And, train it!
- detection_dnn.py is detect the object and counts what kind of the trash is and returns the nearest classification(ex. plastic, paper, can.. etc).
- detection_face.py is detect the face, counts whose face it is close to, and returns the person who counts the most.
- ctr_final.py is the main file of this project. in this file, it detect the face and checks who throws it away, checks which garbage is, gives the user a reward, runs motor control, and collects it separately.
- In my repository there is no weights files, because they are heavy files. If you want our trained weights, contect me.
- Because I was in charge of object detection, I am not well aware of the applications and servers, databases, and motor control used.