Skip to content

smu-ivpl/Toothbrush-Inspection

Repository files navigation

Toothbrush-Inspection

Detect defect bamboo toothbrush with CNN based algorithm

This project is implemented to achieve 4 module detection

  1. Detect defect toothbrush from frontal toothbrush image
  2. Detect defect crack from frontal toothbrush image
  3. Detect defect side toothbrush from side toothbrush image
  4. Detect defect crack from back toothbrush image

Environment

pip install -r requirements.txt

1. Download Datset

download dataset from datasets

download datasets.tar and untar

tar -xvf datasets.tar 

2. Demo

0) inference 4 modules in real time

python new_main.py

1) inference with trained model

download models from trained models

and place it ..

/models/back_crack/mask_rcnn_toothbrush_crack_0069.h5
/models/brush/mask_rcnn_toothbrush_head_0020.h5
/models/brush/efficient-best_weight_220119_2.h5
/models/brush/eff0_220928_2.h5
/models/front_crack/mask_rcnn_toothbrush_crack_0084.h5

1-1) inference with your trained model with custom data

place wherever you want


  1. Detect defect toothbrush from frontal toothbrush image
python toothbrush_head_final.py

image

  1. Detect defect crack from frontal toothbrush image
python toothbrush_crack_final.py

image

  1. Detect defect side toothbrush from side toothbrush image
python toothbrush_side_final.py

image

  1. Detect defect crack from back toothbrush image
python toothbrush_back_final.py

image

2) inference 4 modules in real time (faster .ver using multiprocess)

python multi_que.py

3. Visualize

  1. Detect defect toothbrush from frontal toothbrush image
python toothbrush_head_final_visualize.py

example images :

image image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages