YOLOv5s Raw Material Detection

This YOLOv5s model underwent training using a meticulously curated custom dataset tailored to specific classes such as wood, glass, metal, concrete, and plastic. The primary objective of this project was to assess the model’s proficiency in accurately detecting these diverse objects within a suburban setting. Despite the inherent challenges posed by the varied shapes, sizes, and colors of these materials, the model exhibited remarkable accuracy, even when trained on a relatively limited dataset.

On the left are some examples of the dataset used to train the model. Each class comprises of 100 annotated images. But due to the huge variety of the classes, we would need about 1000 images per class and 5000 iterations to get the model to be consistent.

The dataset can be found on Roboflow if you wish to use it yourself
The model was trained for 250 epochs with a batch size of 25 on an 8 GB RTX 2080. Training was cut short due to a lack of improvement at epoch 128.

The results were quite good taking into consideration the small dataset and limited training. Looking at the validation images, we see the YOLOv5s did fairly well, except for a few hiccups with the concrete slabs and statue.
Finally, here are some detection examples. For this particular set of images, the YOLOv5s was able to have an average predict time of 17.6ms and a NMS per image of 3.6ms

We can see that there is still room for improvement. The model fails to detect certain parts of the image and the confidence levels are not as high as I would like them to be. But overall, I am happy with the results.