Hi i am new to openvino and depthai and was using the following guide to run inference on a onnx converted model:
https://docs.luxonis.com/en/latest/pages/tutorials/local_convert_openvino/
I replaced the blob model in the example with the blob converted from ssd-resnet34-1200-onnx
https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/ssd-resnet34-1200-onnx/ssd-resnet34-1200-onnx.md
and written the following json config file:
{
"NN_config": {
"output_format" : "raw"
}
}
i get the json parse error but the json format appears fine::
(venv) C:\Users\91953\Desktop\varun>python inference_test.py
XLink initialized.
Sending internal device firmware
Successfully connected to device.
Usb speed : Unknown
Mx serial id : UNKNOWN
Loading config file
Attempting to open stream config_d2h
watchdog started
Successfully opened stream config_d2h with ID #0!
Closing stream config_d2h: ...
Closing stream config_d2h: DONE.
EEPROM data: valid (v5)
Board name : BW1098OBC
Board rev : R0M0E0
HFOV L/R : 71.86 deg
HFOV RGB : 68.7938 deg
L-R distance : 7.5 cm
L-RGB distance : 3.75 cm
L/R swapped : yes
L/R crop region: center
Rectification Rotation R1 (left):
0.999950, -0.009952, 0.000520,
0.009950, 0.999944, 0.003589,
-0.000556, -0.003584, 0.999993,
Rectification Rotation R2 (right):
0.999998, -0.001687, -0.000813,
0.001684, 0.999992, -0.003587,
0.000819, 0.003586, 0.999993,
Calibration intrinsic matrix M1 (left):
854.064453, 0.000000, 638.718323,
0.000000, 854.591553, 402.850891,
0.000000, 0.000000, 1.000000,
Calibration intrinsic matrix M2 (right):
862.126160, 0.000000, 644.962463,
0.000000, 862.524658, 404.296936,
0.000000, 0.000000, 1.000000,
Calibration rotation matrix R:
0.999965, -0.008272, 0.001345,
0.008262, 0.999940, 0.007174,
-0.001404, -0.007163, 0.999973,
Calibration translation matrix T:
-7.468051,
0.012595,
0.006073,
Calibration Distortion Coeff d1 (Left):
-5.051971, 16.811293, -0.000185, 0.000333, -19.173475, -5.106388, 17.013073,
-19.362007, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,
Calibration Distortion Coeff d2 (Right):
-5.603961, 18.466002, 0.000237, -0.000819, -20.862078, -5.657426, 18.686985,
-21.086634, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,
C:\Users\91953\Desktop\varun\resnet34-ssd1200.json
depthai: Calibration file is not specified, will use default setting;
config_h2d json:
{"board":{"calib_data":[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.
0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],
"mesh_left":[0.0],"mesh_right":[0.0]},"load_inBlob":true,"pipeline":{"streams":[{"name":"previewout"},{"name":"metaout"}]},"ai":{"NCEs":1,"NN_config":{"output_format":"raw"},"blob0_size":42499520,"blob1_size":0,"calc_dist_to_bb":fal
se,"camera_input":"rgb","cmx_slices":7,"keep_aspect_ratio":true,"num_stages":1,"shaves":7},"app":{"enable_reconfig":true,"sync_sequence_numbers":false,"sync_video_meta_streams":false,"usb_chunk_KiB":64},"board":{"clear-eeprom":false,"l
eft_fov_deg":69.0,"left_to_rgb_distance_m":0.0,"left_to_right_distance_m":0.03500000014901161,"name":"","override-eeprom":false,"revision":"","rgb_fov_deg":69.0,"stereo_center_crop":false,"store-to-eeprom":false,"swap-left-and-right-ca
meras":false},"camera":{"mono":{"fps":30.0,"resolution_h":720,"resolution_w":1280},"rgb":{"fps":30.0,"resolution_h":1080,"resolution_w":1920}},"depth":{"depth_limit_mm":10000,"lr_check":false,"median_kernel_size":7,"padding_factor":0.3
0000001192092896,"warp_rectify":{"edge_fill_color":-1,"mirror_frame":true,"use_mesh":false}},"ot":{"confidence_threshold":0.5,"max_tracklets":20}}
size of input string json_config_obj to config_h2d is ->1556
size of json_config_obj that is expected to be sent to config_h2d is ->1048576
Attempting to open stream config_h2d
Successfully opened stream config_h2d with ID #1!
Writing 1048576 bytes to config_h2d
!!! XLink write successful: config_h2d (1048576)
Closing stream config_h2d: ...
Closing stream config_h2d: DONE.
Creating observer stream host_capture: ...
Attempting to open stream host_capture
Successfully opened stream host_capture with ID #0!
Creating observer stream host_capture: DONE.
Read: 42499520
Attempting to open stream inBlob
Successfully opened stream inBlob with ID #1!
Writing 42499520 bytes to inBlob
!!! XLink write successful: inBlob (42499520)
Closing stream inBlob: ...
Closing stream inBlob: DONE.
depthai: done sending Blob file C:\Users\91953\Desktop\varun\resnet34-ssd1200.blob
Attempting to open stream outBlob
Successfully opened stream outBlob with ID #1!
←[31mF: [global] [ 0] [EventRead00Thr] dispatcherEventReceive:91 Duplicate id detected.
←[0m
←[35mE: [global] [ 0] [EventRead00Thr] handleIncomingEvent:543 Assertion Failed: event->header.type >= XLINK_WRITE_REQ && event->header.type != XLINK_REQUEST_LAST && event->header.type < XLINK_RESP_LAST
←[0m
←[31mF: [xLink] [ 0] [Scheduler00Thr] dispatcherResponseServe:768 no request for this response: XLINK_CREATE_STREAM_RESP 1
←[0m
←[35mE: [global] [ 0] [] addEvent:264 Condition failed: event->header.flags.bitField.ack != 1W←[0m
inU←[35mE: [global] [ 0] [] addEventWithPerf:276 sb addEvent(event) method call failed with an error: 3_←[0m
W←[35mE: [global] [ 0] [] XLinkReadData:156 rCondition failed: (addEventWithPerf(&event, &opTime))itePipe: System err ←[0m
2Device get data failed: 7
2
WinUsb_WritePipe failed with error:=22
←[35mE: [global] [ 0] [Scheduler00Thr] dispatcherEventSend:53 Write failed (header) (err -2) | event XLINK_WRITE_RESP
←[0m
←[35mE: [xLink] [ 0] [Scheduler00Thr] sendEvents:1027 Event sending failed←[0m
Closing stream outBlob: ...
Closing stream outBlob: DONE.
WinUsb_WTraceback (most recent call last):
r File "inference_test.py", line 13, in <module>
it "blob_file_config": str(Path('resnet34-ssd1200.json').resolve().absolute()),
eRuntimeError: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal
Pipe: System err 22
WinUsb_WritePipe failed with error:=22
←[35mE: [global] [ 0] [Scheduler00Thr] dispatcherEventSend:53 Write failed (header) (err -2) | event XLINK_CLOSE_STREAM_REQ
←[0m
←[35mE: [xLink] [ 0] [Scheduler00Thr] sendEvents:1027 Event sending failed←[0m
=== New data in observer stream host_capture, size: 4
Writing 4 bytes to host_capture
!!! XLink write successful: host_capture (4)
Stopping threads: ...
Stopping threads: DONE 0.000s.
Closing all observer streams: ...
Closing stream host_capture: ...
WinUsb_WritePipe: System err 22
WinUsb_WritePipe failed with error:=22
←[35mE: [global] [ 0] [Scheduler00Thr] dispatcherEventSend:53 Write failed (header) (err -2) | event XLINK_WRITE_REQ
←[0m
←[35mE: [xLink] [ 0] [Scheduler00Thr] sendEvents:1027 Event sending failed←[0m
Closing stream host_capture: DONE.
Closing all observer streams: DONE.
Reseting device: 0.
WinUsb_WritePipe: System err 22
WinUsb_WritePipe failed with error:=22
←[35mE: [global] [ 0] [Scheduler00Thr] dispatcherEventSend:53 Write failed (header) (err -2) | event XLINK_RESET_REQ
←[0m
←[35mE: [xLink] [ 0] [Scheduler00Thr] sendEvents:1027 Event sending failed←[0m
Reseting: DONE.
Is there something basic that i am doing wrong?