Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6482 Discussions

Error when trying to run Brain Segmentation Jupyter Notebook for Edge AI Certification

Beverly_K_Intel
Employee
1,605 Views

When I try to run the 3rd cell in the Jupyter Notebook for the Brain Segmentation exercise I get the error:

 

[ ERROR ]  Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.front.override_batch.OverrideBatch'>): The input layer saver_filename has a shape [] defined in the model. 
0 Kudos
1 Solution
Hari_B_Intel
Moderator
1,553 Views

Hi @Beverly_K_Intel 

thank you for your patience, I encounter the same issue as you when launching the Edge AI Certificate. I will get the respective team fix the issue. 

meanwhile to proceed with your training, here is some workaround. 

1. before cell 3, add a new cell. 

2. Incert this line of code 

       print ("OpenVINO Model Directory = ",openvino_model_dir)
       print ("OpenVINO Model Name = ",openvino_model_name)
       path_to_xml_file = "{}.xml".format(os.path.join(openvino_model_dir, openvino_model_name))
       path_to_bin_file = "{}.bin".format(os.path.join(openvino_model_dir, openvino_model_name))
       print("OpenVINO IR: {}, {}".format(path_to_xml_file, path_to_bin_file))

3. If you could see the following results where the .xml and .bin file is generated, skip the mo.py 's cell and the remaining cell should work. 

OpenVINO Model Directory =  output/FP32
OpenVINO Model Name =  2d_unet_decathlon
OpenVINO IR: output/FP32/2d_unet_decathlon.xml, output/FP32/2d_unet_decathlon.bin

Hope this information help. 

Thank you

View solution in original post

0 Kudos
5 Replies
Hari_B_Intel
Moderator
1,592 Views

Hi @Beverly_K_Intel 

Thank for contacting us, I have a quick run on my end for the Brain Tumor Segmentation, I manage to generate IR file successfully. 

Can you check if your 3rd cell brain Segmentation looks similar to mind 3rd cell?  

 

# Create FP16 IR files
!mo.py \
--input_model /data/Healthcare_app/data/saved_model_frozen.pb \
--input_shape=[1,144,144,4] \
--data_type FP16 \
--output_dir models/FP16 \
--model_name saved_model

# Create FP32 IR files
!mo.py \
--input_model /data/Healthcare_app/data/saved_model_frozen.pb \
--input_shape=[1,144,144,4] \
--data_type FP32 \
--output_dir models/FP32 \
--model_name saved_model

# find all resulting IR files
!echo "\nAll IR files that were created:"
!find ./models -name "*.xml" -o -name "*.bin"

 

If the cell looks similar to mine, maybe you can restart the kernel by clicking the Kernel Tab, then click on "Restart Kernel and Clear all output" or you can run all cell. 

FYI, model downloader might take some time to download the model and convert to IR file, once complete, you can see a "Successful message" show in the attachment 

0 Kudos
Beverly_K_Intel
Employee
1,578 Views

I have tried restarting the kernel many times. I have attached a screenshot of the error I get.

 

Thanks,

Beverly

 

0 Kudos
Beverly_K_Intel
Employee
1,577 Views

After looking at your message, it seems that you may have a different notebook than I do.

 

 

0 Kudos
Hari_B_Intel
Moderator
1,564 Views

Hi, @Beverly_K_Intel thank you for the screenshot. I will get back to you soon once I got the same sample.  

0 Kudos
Hari_B_Intel
Moderator
1,554 Views

Hi @Beverly_K_Intel 

thank you for your patience, I encounter the same issue as you when launching the Edge AI Certificate. I will get the respective team fix the issue. 

meanwhile to proceed with your training, here is some workaround. 

1. before cell 3, add a new cell. 

2. Incert this line of code 

       print ("OpenVINO Model Directory = ",openvino_model_dir)
       print ("OpenVINO Model Name = ",openvino_model_name)
       path_to_xml_file = "{}.xml".format(os.path.join(openvino_model_dir, openvino_model_name))
       path_to_bin_file = "{}.bin".format(os.path.join(openvino_model_dir, openvino_model_name))
       print("OpenVINO IR: {}, {}".format(path_to_xml_file, path_to_bin_file))

3. If you could see the following results where the .xml and .bin file is generated, skip the mo.py 's cell and the remaining cell should work. 

OpenVINO Model Directory =  output/FP32
OpenVINO Model Name =  2d_unet_decathlon
OpenVINO IR: output/FP32/2d_unet_decathlon.xml, output/FP32/2d_unet_decathlon.bin

Hope this information help. 

Thank you

0 Kudos
Reply