Make a model with Microsoft lobe, export it, and run SDTest as a front end, that's it! That's why I tried feeding the MVTec anomaly detection dataset to lobe. Anomaly detection was inspired by @ shinmura0's article. SDTest was released around the same time, and I felt that I could develop an image inspection machine at low cost, and my entire history of anomaly detection began.
@ daisukelab's method of training a model nicely by applying deep distance learning to the MVTec anomaly detection data set is also very helpful. I was convinced that if I learned on colab, I could learn properly even with a weak machine, and if I did it well, it would be a level that can really be used in the field, but I thought that the learning cost was a little high, or it was annoying. I did.
Meanwhile, I watched the demo video of lobe, and this is it: bangbang: https://youtu.be/Mdcw3Sb98DA
What's amazing is that the model creation is completely no code. What's more, with what accuracy, it is easy to understand which image has an inference error. It is also good to start learning automatically without using the learning button. Even better, additional learning is automatic. If there is: white_check_mark :, if it is wrong: no_entry: to start additional learning without permission Export the created model with lobe-python
from lobe import ImageModel
from PIL import Image
model = ImageModel.load('path/to/exported/model')
img = Image.open('path/to/file.jpg')
result = model.predict(img)
I can infer just by doing it, so I tried to rush into SDTest with too much momentum. lobe-python did not work on Python 3.6 on Windows, so I recreated the environment with 3.7 in Anaconda and adjusted the version of SDTest requirements.
###### Requirements with Version Specifiers ######
fbs[sentry] == 0.8.3
PyQt5 == 5.13.*
PyQtWebEngine == 5.13.*
PyInstaller == 3.4
tensorflow == 1.15.*
keras == 2.2.*
lobe also supports Tensorflow-lite and is officially running on a Raspberry Pi 4 (Pi 3 seems to work and sometimes doesn't). SDTest is also unofficial, but Pi 4 will work.
For cooperation with robots and PLCs, refer to src / main / python / model / serving_dobot.py
in the connect_to_dobot
branch, and if you communicate with the socket library, peripheral devices are cheaper. And it is a versatile image inspection machine for people who do not do their best.