[root@milkv-duo]~# ./sample_yolov8 ./yolov8n_cv181x_int8_sym.cvimodel ./bus_640 .jpg [ 9792.491457] vb has already inited, set_config cmd has no effect ---------------------openmodel-----------------------version: 1.4.0 yolov8n Build at 2025-03-05 23:09:23 For platform cv181x Max SharedMem size:385024 open model failed with 0xc0010102! [root@milkv-duo]~# ^C [root@milkv-duo]~#
[root@milkv-duo]~# ./sample_yolov8 ./yolov8n_cv181x_int8_sym.cvimodel ./bus_640 .jpg [ 9792.491457] vb has already inited, set_config cmd has no effect ---------------------openmodel-----------------------version: 1.4.0 yolov8n Build at 2025-03-05 23:09:23 For platform cv181x Max SharedMem size:385024 open model failed with 0xc0010102! [root@milkv-duo]~#
because i am having always this erros for the cvimodels that i got when training to new objects
aborted this link
Finally, Stephen
https://t.me/+eDU3zILAWV43MmEx
see if works
(public)
Here the blog
https://milk-v.blogspot.com/2025/03/introducao-deteccao-de-objetos-pessoas.html
https://t.me/sg2002AI
Big progress here!
Stepher, have you a Whatsupp number ? i want to add you! And a friend from china too!
Or, telegram ?
Is this the sequence that you you use to convert MLIR to CVIMODEL ?
hi, got progress, updated the libraries to latest and your model inference is ok
thanks
i am executing on MILK-V DUO 256 your bin files...
better is me wait for the module that i order from ALIEXPRESS:(
But in you side, detected, right ?
Stephen
In your side detected something ?
[root@milkv-duo]~# ./sample_yolov8 ./yolo11n_320_int8_2_class.cvimodel ./blue_ci
rcle_mat_mp4-0129_jpg.rf.248f6b4aecdc00b275f4a6ca63794d25.jpg
[169309.974946] vb has already inited, set_config cmd has no effect
enter CVI_TDL_Get_YOLO_Preparam...
asign val 0
asign val 1
asign val 2
setup yolov8 param
enter CVI_TDL_Get_YOLO_Preparam...
setup yolov8 algorithm param
yolov8 algorithm parameters setup success!
version: 1.4.0
yolo11n_320 Build at 2025-01-25 17:10:07 For platform cv181x
Max SharedMem size:588800
image read,width:640
image read,hidth:640
Detection FPS: 1487.707814
Detected objects cnt: 0
Detected objects:
[root@milkv-duo]~#
Hi :)
Still tryng o solve the error...
Can you send me your CVIMODEL trainned for the TARGET ?
And on COLAB, your model base used to train and create the best.pt was yolov8n.pt ?
this maybe make sense..
because in the past, i remember that i was not getting success to train more that 2 objects (class) on monkeys and persons
Iot Smartcore: MILK-V - CRIANDO DATASET DO ZERO - BUGGIO
i remember that works only with two class monkey...
i will verify tomorrow the source code of sample_yolov8.cpp
i am using the colab
https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/train-yolov8-obb.ipynb
what mean MODEL_CLASS_CNT ?
custom trainned...
for your cvimodels trainned works nice!
i am doing something wrong during the process from best.pt to cvimodel conversion...
yes!
On colab
After unzip your ZIP file...
I executed the batch
from ultralytics import YOLO
model = YOLO('yolov8n.pt')
results = model.train(data=f"data.yaml", epochs=100, imgsz=640)
I got best.pt
then
from ultralytics import YOLO
import types
import sys
def forward2(self, x):
x_reg = [self.cv2i for i in range(self.nl)]
x_cls = [self.cv3i for i in range(self.nl)]
return x_reg + x_cls
model_path = './best.pt'
model = YOLO(model_path)
model.model.model[-1].forward = types.MethodType(forward2, model.model.model[-1])
model.export(format='onnx', opset=11, imgsz=640)
then i got best.onnx
model_transform.py
--model_name yolov8n
--model_def best.onnx
--input_shapes [[1,3,640,640]]
--mean 0.0,0.0,0.0
--scale 0.0039216,0.0039216,0.0039216
--pixel_format "rgb"
--keep_aspect_ratio
--test_input /workspace/tpu-mlir/regression/image/test.jpg
--test_result yolov8n_top_outputs.npz
--mlir yolov8n.mlir
then i got yolov8n.mlir
run_calibration.py yolov8n.mlir
--dataset /workspace/tpu-mlir/regression/dataset/<folder with your train image>
-o yolov8n_cali_table
then i got yolov8n_cali_table
model_deploy.py
--mlir yolov8n.mlir
--quantize INT8
--calibration_table ./yolov8n_cali_table
--chip cv181x
--test_input /workspace/tpu-mlir/regression/image/test.jpg
--test_reference yolov8n_top_outputs.npz
--compare_all
--tolerance 0.96,0.72
--fuse_preprocess
--model yolov8n_int8_fuse.cvimodel
then i got yolov8n_int8_fuse.cvimodel
transfered to milk-v 256
got
[root@milkv-duo]~# ./sample_yolov8 ./yolov8n_cv181x_int8_sym.cvimodel ./bus_640
.jpg
[ 9792.491457] vb has already inited, set_config cmd has no effect
---------------------openmodel-----------------------version: 1.4.0
yolov8n Build at 2025-03-05 23:09:23 For platform cv181x
Max SharedMem size:385024
open model failed with 0xc0010102!
[root@milkv-duo]~# ^C
[root@milkv-duo]~#
[root@milkv-duo]~# ./sample_yolov8 ./yolov8n_cv181x_int8_sym.cvimodel ./bus_640
.jpg
[ 9792.491457] vb has already inited, set_config cmd has no effect
---------------------openmodel-----------------------version: 1.4.0
yolov8n Build at 2025-03-05 23:09:23 For platform cv181x
Max SharedMem size:385024
open model failed with 0xc0010102!
[root@milkv-duo]~#
because i am having always this erros for the cvimodels that i got when training to new objects
If possible, send us the step / tips that you follow it...and share your images used to the train...:)
Hi :) One more question!
Did you train on Robloflow or on COLAB ?