"Similarity comparison model training and deployment application on AidLux"--implementing seal similarity comparison

"Similarity Comparison Model Training and Deployment Application on AidLux" – Implementing Seal Similarity Comparison
1. Introduction to the Authenticity and False Identification Algorithm Based on Similarity Comparison
(1) Starting point: Use the deep neural network to extract the deep features of the seals, and at the same time learn the similarity between the seals. Oneself is similar to oneself, and oneself is not similar to others.
(2) Common deep learning methods for similarity measurement: Siamese network, Triplet Loss network, and this method.
2. Similarity comparison model training and testing
(1) The training steps are:
①Place the data in the above format Set and place it under the dataset. folder;
②Set train_own_data in train.py to True;
③Run train.py to start training and you can observe Corresponds to the accuracy of the step training set and validation set.
After the training is completed, you can view the oSs record and loss curve during the training process in the log folder.
(2) Model conversion and testing
①pth->onnx
Model conversion: select the best model for conversion, For the code, see - model_convert/pth2onnx.py
Model inference: for the onnx inference code, see model_convert/onnx_infer.py
②onnx->tflite
Open the website: https://aimo.aidlux.com/#/model-convert
Enter the trial account and password: Account: AIMOTC001, Password: AIMOTC00
Model conversion
Model inference
③onnx->dlc
Perform model conversion
3 .AidLux platform deployment
Perform tflite deployment and dlc deployment.
4. Practical process
Train your own similarity comparison model, complete the model conversion to onnx, and then use the AIMO conversion tool to convert it to tflite model and dlc online The model is tested against two pairs of pictures in the test set (two real seals of the same style and a real seal and the corresponding fake seal).

For the specific conversion process, reasoning process, and visualization results, please see: https://www.bilibili.com/video/BV1kM411X7tG/?share_source=copy_web&vd_source=29e5668e7df0548f3d8237cf7fb3d84a

Guess you like

Origin blog.csdn.net/heromps/article/details/134093653