luxonis / depthai-ml-training

Some Example Neural Models that we've trained along with the training scripts
MIT License
118 stars 32 forks source link

Conversion issue #50

Closed martin0496 closed 1 year ago

martin0496 commented 1 year ago

https://colab.research.google.com/drive/1oNxfvx5jOfcmk1Nx0qavjLN8KtWcLRn6?usp=sharing#scrollTo=b5Z1QFooGIW8

Hi I am working on this project and I want to test it. The code works fine until the conversion starts. I receive multiple errors. Can you please help with this and try to check the code ?

Thank you very much

Erol444 commented 1 year ago

@tersekmatija @HonzaCuhel do we have any working classification notebook?

tersekmatija commented 1 year ago

@Erol444 Will be released with the new library when we get dataset format defined, otherwise no. We are looking into fixing this one already as it was mentioned in other channels.

HonzaCuhel commented 1 year ago

Hi @martin0496,

I apologize for delay in my reply. I looked at the Colab notebook and made several changes so that the model can be now converted. You can find the updated Colab notebook here and the generated blob file here.

Best, Jan

martin0496 commented 1 year ago

Thank you very much for all your support and guidance

martin0496 commented 1 year ago

@HonzaCuhel @tersekmatija

Hi all,

at the cell of conversion to blob file , I get error: Unknown model format! Cannot find reader for model format: xml and read the model: /content/flower/IR_models/FP16/flower.xml. Please check that reader library exists in your PATH.

eventhough the conversion to openvino format works well. IS this related to the openvino-dev version ?

HonzaCuhel commented 1 year ago

Hi @martin0496,

I'll look into it. Did it work for you last week?

Best, Jan

martin0496 commented 1 year ago

@HonzaCuhel

I tried it for the first time today. When I run the mo command it was not found that is why i installed openvino-dev using pip. After some research i found that the problem is related to versions. how can I solve it and make it run to achieve the final blob model ? Thank you very much for the support

martin0496 commented 1 year ago

@HonzaCuhel

if we are installing a specific version of openvino to do the conversion, why we use the !mo command ? because when I try to run it, the error is " mo command not found"

I will be very grateful if you can check the conversion part. THank you very much for all your support and guidance

tersekmatija commented 1 year ago

Hey @martin0496 , can you give this notebook a try? Note you will have to restart the runtime after the first 2 packages get installed. Let me know if this works.

martin0496 commented 1 year ago

@tersekmatija @HonzaCuhel

Thank you very much for this great tutorial. Now the conversion is working fine and I can get the final blob file. Great and detailed work. The problem occurs during the implementation. when I test the model using depthai I get this error Input image (320x320) does not match NN (3x180) also when I try to test the openvino model I get this error could not broadcast input array from shape (1,3,180,180) into shape (1,180,180,3). I guess the problem is related to the input_shape during the !mo conversion: I tried to change [1,180,180,3] to [1,3,180,180] and other related shapes but the conversion fails if I change the input shape. Maybe it is a problem related to the selected shape and image format during the training. Do you have any information on how can I solve this issue ?

Thank you very much for all your guidance

HonzaCuhel commented 1 year ago

I've updated the Colab notebook link. @martin0496, can you please try it if it works for you now?

martin0496 commented 1 year ago

@HonzaCuhel @tersekmatija

Thank you very much. The conversion works fine and the final format is correct. Great Tutorial!

HonzaCuhel commented 1 year ago

@martin0496 I am glad to hear that we were able to solve the issue!