Edit model card

Model Card for lego-technic-sorting-model

Classification of lego technic pieces under basic room lighting conditions

Model Details

Model Description

CNN designed from the ground up, without using a pre-trained model to classify images of lego pieces into 7 categories.
Achieved a 93% validation accuracy

  • Developed by: Aveek Goswami, Amos Koh
  • Funded by: Nullspace Robotics Singapore
  • Model type: Convolutional Neural Network (CNN)

Model Sources

Uses

The files in the create-model folder are meant to be used on your own computer. You can train your own deep learning model using your own data and test this model on your computer using testing-tflite-model.py on a single image. The model was trained on Google Colab, so create_training_data_array.py was used to creata a numpy array file to upload data in the form of a numpy array to Google Colab. After transfering the tflite model to your Pi, you can then run the image classification file in the raspberry-pi folder to detect and classify lego pieces in real time.

Example of real time object detection and classification: image/gif

Bias, Limitations and Recommendations

The images of the lego pieces used to train the model were taken in room lighting conditions, illuminated with a torchlight.
To use the model, would recommend trying to recreate the conditions and achieve photographs with a similar lighting.
Otherwise, it might be better to retrain the model with a new dataset of images corresponding to your lighting conditions

Training Details

Training Data

Training Procedure

The model was trained using the GPU's available on Google Colab. The jupyter notebook loaded the data from a npy file (in the dataset card), which contained all the images as well as their category labels.

Preprocessing

Images were normalized before being fed into the model. Their contrast was also increased using the increase_contrast_more function defined in the notebook attached.

Evaluation

Results

Our model was trained with 6000 images across 7 different categories of lego technic pieces, split into a 80/20 train/test split.
It achieved 93% testing accuracy and graphs of the accuracy and loss are shown below.
A confusion matrix was also plotted to visualize the performance of the classification algorithm. It depicts the count value of true versus false predictions across each category.

Unknown-5

Downloads last month
0
Inference API
Unable to determine this model’s pipeline type. Check the docs .