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.

NC_OUT_OF_MEMORY

Scorpion1
Beginner
1,185 Views

I'm currently trying to load a model but I'm getting this error, based off previous posts I'd read it seemed to be due to file size but on further testing it seems to be my specific model. I'm able to run models with file sizes of 260mb but not this one which is 57.5mb, this is also occurring on trying to load the model to the device so I don't believe it has to do with anything else happening in the code. 

If anyones familiar with causes of this error or could say why this particular model is having issues it would be appreciated. 

This neural network is meant for identifying faces in images, I converted it expected 1024x1024 and adjust the size in code as needed with the below. 

net.reshape({'data':[1, 3, x_axis, y_axis]})

 Also the basic code I use to load the mode, input being the image and shape just being the numpy array shape to set the size

def openvino_rf_infer(inputs, shape):
	model_xml = 'Retinaface.xml'
	model_bin = "Retinaface.bin"
	ie = IECore()
	print("Available devices:", ie.available_devices)
	net = ie.read_network(model=model_xml, weights=model_bin)
	x_axis = shape[2]
	y_axis = shape[3]
	net.reshape({'data':[1, 3, x_axis, y_axis]})
	input_blob = next(iter(net.input_info))
	device = 'MYRIAD'
	exec_net = ie.load_network(network=net, device_name=device)
	return exec_net.infer(inputs={input_blob: inputs})

 Since this isn't related to intels library its probably inconsequential but I also tried doing it with depthai and got the same error on trying to load the model if thats any help

 

0 Kudos
8 Replies
IntelSupport
Community Manager
1,165 Views

Hi Scorpion1,

Thanks for reaching out.

This error can be caused by an inadequate amount of power being supplied to the NCS2. Plug the NCS2 directly into your system and try to run the inference again. Avoid using powered USB hubs to prevent power issues.

 

Regards,


0 Kudos
Scorpion1
Beginner
1,151 Views

I'd first like to thank you for your response I've been struggling with this for a while. I have it plugged directly into my computer like suggested rather then a USB hub or anything. I also made sure to check all layers of the model were compatible with the myriad. Could it be something specific to the model since all my other ones run on it? It works fine on CPU and gets the expected outputs

0 Kudos
IntelSupport
Community Manager
1,116 Views

Hi Scorpion1,

According to the Intel Movidius Neural Compute SDK page, the error means that the host is out of memory. If possible, can you run one of OpenVINO's pre-trained models to ensure that there is no memory issue?

 

Regards,

Aznie


0 Kudos
Scorpion1
Beginner
1,106 Views

I've run a few of the openvino provided examples in the past to make sure it isn't something on my end, along with various of my own. Its only ever a problem when trying to use this specific model 

0 Kudos
IntelSupport
Community Manager
1,078 Views

Hi Scorpion1,

Basically, the reason why Out of memory issues occurs is due to a higher resolution image will still not work even on NCS2.

As the error message says, there is not enough memory on one NCS2 to support that high resolution. The reason for the intel pre-trained model able to perform inference successfully is because the model is trained with a low resolution that is suitable for NCS2.

 

We recommend using the lower resolution image for better results if it is possible.

 

 

Regards,

Aznie


0 Kudos
Scorpion1
Beginner
1,064 Views

I'm assuming this would be the result of file size, so if somewhere in the pipeline it took an image from the camera feed, compressed it, then sent it to the model it would be fine? I just have to adhere to some size limit? Is there info on what that would be?

0 Kudos
IntelSupport
Community Manager
1,013 Views

Hi Scorpion1,

It will not affect the file size and there is no size limit for that. However, since you have used a higher resolution, which is 1024 x 1024, it is recommended to use a slightly lower resolution image so that it will compatible with NCS2.

 

Regards,

Aznie


0 Kudos
IntelSupport
Community Manager
955 Views

Hi Scorpion1,

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


Regards,

Aznie


0 Kudos
Reply