This project is to design a system for detecting the anomalies during the printing process. We collect our own dataset with a RPI and a Ender 3 pro. This project mainly consists three components - RPI, User application, and Linebot. Users can setup these three components to start using our projects.
# Download the weights
$ wget -O weights/resnet.onnx https://github.com/Justin900429/3d-printer-anomaly-detect/releases/download/v0.0.1/resnet.onnx
$ wget -O weights/resnet.pt https://github.com/Justin900429/3d-printer-anomaly-detect/releases/download/v0.0.1/resnet.pt
$ wget -O weights/resnet.pt https://github.com/Justin900429/3d-printer-anomaly-detect/releases/download/v0.0.1/quantized.pt
# Install the python package
$ pip install -r requirements.txt
Before using our project, users should install OctoPrint first
$ pip install opencv-python
$ python send_image.py
$ python backend/main.py
We use ngrok to host our linebot server, users can use Heroku as well
$ export FLASK_APP=app.py
$ flask run
We upload our data to kaggle.
Training method | Acc | UF1 | Model size |
---|---|---|---|
Meta Learning | 100% | 1.0 | 85.3 MB |
Quantization aware training | 100% | 1.0 | 21.5 MB |
We test the inference speed with CPU on MacBook Pro 2020 by averaging the 10 samples' runtime
Model | Avg. inference time |
---|---|
PyTorch | 0.2544 s |
ONNX | 0.0382 s |
Quantization (PyTorch) | 0.0356 s |
Usage | Link |
---|---|
Meta Learning | |
Quantization |