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

NCSDK V2.05 mvNCCheck failed when caffe network with 1 channel input

idata
Employee
990 Views

the network has input like this:

 

name: "suma" input: "data" input_shape { dim: 1 dim: 1 dim: 11 dim: 11 }

 

that means we just need 1 channel,not rgb 3 channels.

 

And the mvNCCheck failed:

 

Traceback (most recent call last): File "/usr/local/bin/ncsdk/mvNCCheck.py", line 202, in <module> quit_code = check_net(args.network, args.image, args.inputnode, args.outputnode, args.nshaves, args.inputsize, args.weights, args) File "/usr/local/bin/ncsdk/mvNCCheck.py", line 169, in check_net load_ret = load_network(args, parser, myriad_config) File "/usr/local/bin/ncsdk/Controllers/Scheduler.py", line 103, in load_network parse_ret = parse_caffe(arguments, myriad_conf) File "/usr/local/bin/ncsdk/Controllers/CaffeParser.py", line 414, in parse_caffe channel_swap=channel_swap) File "/usr/local/bin/ncsdk/Controllers/MiscIO.py", line 273, in preprocess_img data[0] = data[0][np.argsort(channel_swap), :, :] IndexError: index 2 is out of bounds for axis 0 with size 1

 

I debug mvNCCheck.py, it caused by :

 

input_data = preprocess_img(input_data, raw_scale=raw_scale, mean=mean, channel_swap=channel_swap)

 

when input_image is None or input_image == "Debug" in this situation, we needn't do channel_swap, bucause the input_image is gengerated by

 

input_data = np.random.uniform(-1, 1, input_shape).astype(dtype=data_type)

 

So I just modified channel_swap=channel_swap to channel_swap=None, the preprocess_img() can do mean and scale as well, which in NCSDK V2.04 it didn't do.

2 Replies
idata
Employee
750 Views

@thomascatlee Thanks for reporting this. mvNCCheck is designed for 3 channel models at the moment so that could be the reason why you're running into issues with your 1 dim network. Your feedback is important and we will consider this for any future releases.

0 Kudos
lius
Beginner
750 Views

hi, mdata

does the mvnc support the input channel of 1 now(gray image)?

0 Kudos
Reply