-
Notifications
You must be signed in to change notification settings - Fork 42
How to use MaixPy3 nn to load custom models #9
Comments
I subscribe to the question. How to train and convert your own network models? Ok found https://www.maixhub.com/modelConvert |
Hi, I have the same question, i've tested the demos and it works, but there is no information how to use custom network models. I hope some body could help us, because Maix-II looks very good and a looks like true replacement for raspberry pi 4 and maybe Jetson Nano for some cases, for simple image processing. |
the doc is not ready yet, but you can read this post( wriiten with Chinese so you may need to use google translate ) https://neucrack.com/p/358 |
It seems that the blog post has translation disabled. Not appearing on Chrome & Safari |
Thank you very much. Google tranlator doesn't work, but the source code is in english. To help others like me here is de summary: This are the codes of the functions: def torch_to_onnx(net, input_shape, out_name="out/model.onnx", input_names=["input0"], output_names=["output0"], device="cpu"):
def onnx_to_ncnn(input_shape, onnx="out/model.onnx", ncnn_param="out/conv0.param", ncnn_bin = "out/conv0.bin"): First you must have the model and the input shape:model = xxxxxx. # Code to crate a custom model Then you have to call the functionstorch_to_onnx(model, input_shape, onnx_out, device="cuda:0") |
Which model should I used for transfer learning for my custom detection model. I tried with Detectron2 and Torchvision an I succed in getting my NCNN files but when I try tu upload them to the online converter they exceed the 100 MB constrain. |
I have some problem with understanding how to use own models with MaixPy3 nn on Sipeed MAIX-II Dock(V831). In your example scripts is presented resnet model, and it works well. I want to load into sipeed other cnn model, for example yolo3 or mobilenet_ssd for object detection and some other models, that have different formats of popular frameworks( tflite, keras h5, tensorflow pb). In your example model is presented via 2 files: resnet.bin and resnet.param. How can i convert my files of models (h5, or pb, or tflite) into this representation to load with nn lib? Maybe there are some open-source scripts for this purpose? I can
t find some way(scripts) to create resnet.param. In this file was written some params, that i don
t understand.I will be glad your feedback!
The text was updated successfully, but these errors were encountered: