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.
6392 Discussions

Anyone get the Enet segmentation model running on OpenVino?

DaveInPA
New Contributor I
943 Views

Hi - I've been working on an application that uses the Enet architecture and the default trained model that the authors provided. That model was generated in Lua/Torch which isn't supported directly by OpenVino. So i followed the OpenVino docs to expert to the Torch model (.net file) to ONNX but ran into many problems there and assume thats not possible without modifying the underlying Torch model itself. I found other models out there in caffe but also couldn't get it to compile into a pre-trained model.

 

Just wondering if anyone out there has a pre-trained ENet based model (hopefully trained on city-scapes) that is workign with OpenVino (and hopefulyl Neural Compute stick)?

0 Kudos
6 Replies
IntelSupport
Community Manager
910 Views

Hi David Rosner,

Thanks for reaching out.

Currently, we do not have any ENet architecture pre-trained models available in OpenVINO. However, could you share your models ( Lua/Torch and Caffe) so that we can further assist you and test them from our end? If both models can work on our end, we will update you with the information later.

 

Regards,

Aznie


0 Kudos
DaveInPA
New Contributor I
898 Views

Sure - the model I used is available at a few public sources. I believe i got this from the original authors of the Enet published paper. Its appears to be PyTorch framework. Here is one repository that has it:

 

https://github.com/ishacusp/ARGO_Labs/blob/master/opencv-semantic-segmentation/enet-cityscapes/enet-model.net

 

 

Using the following code worked perfectly fine for me prior to installing OpenVino and the OpenCV bindings that come with it. It runs great on my development machine but its way too slow for RasbPi. So i bought the Neural Compute stick to run it on that platform for my application. I'd be more than happy to help get to the bottom of this if it helps.

 

# load our serialized model from disk
print("[INFO] loading model...")
net = cv2.dnn.readNet(args["model"])

# load the input image, resize it, and construct a blob from it,
# but keeping mind mind that the original input image dimensions
# ENet was trained on was 1024x512
image = cv2.imread(args["image"])
image = imutils.resize(image, width=args["width"])
blob = cv2.dnn.blobFromImage(image, 1 / 255.0, (1024, 512), 0,
	swapRB=True, crop=False)

 

 

 

0 Kudos
DaveInPA
New Contributor I
896 Views

This is the error I get on my end when I run the ENet PyTorch model:

 

[E:] [BSL] found 0 ioexpander device
[E:] [BSL] found 0 ioexpander device
i_n=0
i_c=6
i_wh=6585
index=-1
maxval=-0.156662
outPlaneTotal=131072
input.size=1 x 16 x 128 x 256
indices.size=1 x 16 x 128 x 256
outBlob=1 x 16 x 256 x 512
Traceback (most recent call last):
  File "gp.py", line 240, in <module>
    output = net.forward()
cv2.error: opencv_ngraph_layer:l352_torchMaxUnpooling:
0 Kudos
IntelSupport
Community Manager
886 Views

Hi David Rosner,

Thank you for the model. We are checking on this and will update you with the information soon.

 

Regards,

Aznie


0 Kudos
IntelSupport
Community Manager
860 Views

Hi David Rosner,

We have tested your model and unfortunately, the .net format model is currently not supported by OpenVINO. Meanwhile, looking at the repository that you shared, the model is similar to our semantic-segmentation-adas-0001. I would suggest you explore the model instead with our Image Segmentation Python Demo to see whether it fits with your usage.

 

Regards,

Aznie


0 Kudos
IntelSupport
Community Manager
811 Views

Hi David Rosner,

This thread will no longer be monitored since we have provided the information and suggestion. If you need any additional information from Intel, please submit a new question.


Regards,

Aznie


0 Kudos
Reply