aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuan Zhao2019-09-16 14:53:15 -0500
committerYuan Zhao2019-09-16 14:53:15 -0500
commitf164f67766325c1a217354c4a535e9931298a5f1 (patch)
tree34b2a4c1daca9c65db47cbe8cde8b89ee6b54bd2
parentfb6f5e73e394f10a0ce2b56b5037d1f015205d4e (diff)
parentb83df643de46c2ae198dfdac859e51f6b4acc1ea (diff)
downloadtidl-api-f164f67766325c1a217354c4a535e9931298a5f1.tar.gz
tidl-api-f164f67766325c1a217354c4a535e9931298a5f1.tar.xz
tidl-api-f164f67766325c1a217354c4a535e9931298a5f1.zip
Merge tag 'v01.03.02' into develop
TIDL-API 1.3.2 for Processor SDK 6.1
-rw-r--r--examples/classification/main.cpp20
-rw-r--r--examples/classification/readme.md6
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_dense_1x1.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_inceptionNetv1.txt6
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_inceptionNetv1_lg2.txt6
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_j11_bn.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_j11_cifar.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_j11_controlLayers.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_j11_prelu.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_j11_v2.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_j11_v2_dense.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_j11_v2_dense_lg2.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_j11_v2_lg2.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_jseg21.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_jseg21_dense.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_jseg21_tiscapes.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_mnist_lenet.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_mobileNet1.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_mobileNet1_lg2.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_mobileNet2.txt9
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_mobileNet2_lg2.txt10
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_smallRoi.txt2
-rwxr-xr-xexamples/test/testvecs/config/infer/tidl_config_squeeze1_1.txt2
-rw-r--r--examples/test/testvecs/config/tidl_models/tidl_net_inceptionv1_224.bin (renamed from examples/test/testvecs/config/tidl_models/tidl_inception_v1_net.bin)bin484384 -> 484384 bytes
-rw-r--r--examples/test/testvecs/config/tidl_models/tidl_net_mobilenet_1_224.binbin484384 -> 484384 bytes
-rwxr-xr-xexamples/test/testvecs/config/tidl_models/tidl_net_mobilenet_2_224.binbin0 -> 484384 bytes
-rw-r--r--examples/test/testvecs/config/tidl_models/tidl_param_inceptionv1_224.bin (renamed from examples/test/testvecs/config/tidl_models/tidl_inception_v1_param.bin)0
-rwxr-xr-xexamples/test/testvecs/config/tidl_models/tidl_param_mobilenet_2_224.binbin0 -> 6978194 bytes
-rw-r--r--tidl_api/src/ocl_device.cpp2
29 files changed, 58 insertions, 35 deletions
diff --git a/examples/classification/main.cpp b/examples/classification/main.cpp
index 25361f8..68c5f80 100644
--- a/examples/classification/main.cpp
+++ b/examples/classification/main.cpp
@@ -111,7 +111,8 @@ Rect rectCrop[NUM_ROI];
111// Report average FPS across a sliding window of 16 frames 111// Report average FPS across a sliding window of 16 frames
112AvgFPSWindow fps_window(16); 112AvgFPSWindow fps_window(16);
113 113
114static int tf_postprocess(uchar *in, int size, int roi_idx, int frame_idx, int f_id); 114static int tf_postprocess(uchar *in, int out_size, int size, int roi_idx,
115 int frame_idx, int f_id);
115static int ShowRegion(int roi_history[]); 116static int ShowRegion(int roi_history[]);
116// from most recent to oldest at top indices 117// from most recent to oldest at top indices
117static int selclass_history[MAX_NUM_ROI][3]; 118static int selclass_history[MAX_NUM_ROI][3];
@@ -485,6 +486,7 @@ bool ReadFrame(ExecutionObjectPipeline* eop, const Configuration& c,
485 sprintf(tmp_string, "ROI[%02d]", frame_idx % NUM_ROI); 486 sprintf(tmp_string, "ROI[%02d]", frame_idx % NUM_ROI);
486 cv::imshow(tmp_string, r_image); 487 cv::imshow(tmp_string, r_image);
487 } 488 }
489 image.copyTo(show_image);
488#endif 490#endif
489 imgutil::PreprocessImage(r_image, eop->GetInputBufferPtr(), c); 491 imgutil::PreprocessImage(r_image, eop->GetInputBufferPtr(), c);
490 eop->SetFrameIndex(frame_idx); 492 eop->SetFrameIndex(frame_idx);
@@ -495,10 +497,6 @@ bool ReadFrame(ExecutionObjectPipeline* eop, const Configuration& c,
495 writer << to_stream; 497 writer << to_stream;
496#endif 498#endif
497 499
498#ifdef LIVE_DISPLAY
499 //waitKey(2);
500 image.copyTo(show_image);
501#endif
502 return true; 500 return true;
503 } 501 }
504 } else { 502 } else {
@@ -519,6 +517,7 @@ void DisplayFrame(const ExecutionObjectPipeline* eop, VideoWriter& writer,
519 int f_id = eop->GetFrameIndex(); 517 int f_id = eop->GetFrameIndex();
520 int curr_roi = f_id % NUM_ROI; 518 int curr_roi = f_id % NUM_ROI;
521 int is_object = tf_postprocess((uchar*) eop->GetOutputBufferPtr(), 519 int is_object = tf_postprocess((uchar*) eop->GetOutputBufferPtr(),
520 eop->GetOutputBufferSizeInBytes(),
522 IMAGE_CLASSES_NUM, curr_roi, frame_idx, f_id); 521 IMAGE_CLASSES_NUM, curr_roi, frame_idx, f_id);
523 selclass_history[curr_roi][2] = selclass_history[curr_roi][1]; 522 selclass_history[curr_roi][2] = selclass_history[curr_roi][1];
524 selclass_history[curr_roi][1] = selclass_history[curr_roi][0]; 523 selclass_history[curr_roi][1] = selclass_history[curr_roi][0];
@@ -691,12 +690,17 @@ bool tf_expected_id(int id)
691 return false; 690 return false;
692} 691}
693 692
694int tf_postprocess(uchar *in, int size, int roi_idx, int frame_idx, int f_id) 693int tf_postprocess(uchar *in, int out_size, int size, int roi_idx,
694 int frame_idx, int f_id)
695{ 695{
696 //prob_i = exp(TIDL_Lib_output_i) / sum(exp(TIDL_Lib_output)) 696 //prob_i = exp(TIDL_Lib_output_i) / sum(exp(TIDL_Lib_output))
697 // sort and get k largest values and corresponding indices 697 // sort and get k largest values and corresponding indices
698 const int k = TOP_CANDIDATES; 698 const int k = TOP_CANDIDATES;
699 int rpt_id = -1; 699 int rpt_id = -1;
700 // Tensorflow trained network outputs 1001 probabilities,
701 // with 0-index being background, thus we need to subtract 1 when
702 // reporting classified object from 1000 categories
703 int background_offset = out_size == 1001 ? 1 : 0;
700 704
701 typedef std::pair<uchar, int> val_index; 705 typedef std::pair<uchar, int> val_index;
702 auto cmp = [](val_index &left, val_index &right) { return left.first > right.first; }; 706 auto cmp = [](val_index &left, val_index &right) { return left.first > right.first; };
@@ -725,13 +729,13 @@ int tf_postprocess(uchar *in, int size, int roi_idx, int frame_idx, int f_id)
725 729
726 for (int i = 0; i < k; i++) 730 for (int i = 0; i < k; i++)
727 { 731 {
728 int id = sorted[i].second; 732 int id = sorted[i].second - background_offset;
729 733
730 if (tf_expected_id(id)) 734 if (tf_expected_id(id))
731 { 735 {
732 std::cout << "Frame:" << frame_idx << "," << f_id << " ROI[" << roi_idx << "]: rank=" 736 std::cout << "Frame:" << frame_idx << "," << f_id << " ROI[" << roi_idx << "]: rank="
733 << k-i << ", outval=" << (float)sorted[i].first / 255 << ", " 737 << k-i << ", outval=" << (float)sorted[i].first / 255 << ", "
734 << labels_classes[sorted[i].second] << std::endl; 738 << labels_classes[id] << std::endl;
735 rpt_id = id; 739 rpt_id = id;
736 } 740 }
737 } 741 }
diff --git a/examples/classification/readme.md b/examples/classification/readme.md
index 565807a..047a922 100644
--- a/examples/classification/readme.md
+++ b/examples/classification/readme.md
@@ -3,8 +3,8 @@
3# 1. Live camera input, using 2xEVE and 2xDSP cores, based on model with single layers group 3# 1. Live camera input, using 2xEVE and 2xDSP cores, based on model with single layers group
4./tidl_classification -g 1 -d 2 -e 2 -l ./imagenet.txt -s ./classlist.txt -i 1 -c ./stream_config_j11_v2.txt 4./tidl_classification -g 1 -d 2 -e 2 -l ./imagenet.txt -s ./classlist.txt -i 1 -c ./stream_config_j11_v2.txt
5# 2. Use video clip as input stream, using 2xEVE and 2xDSP cores, based on model with single layers group 5# 2. Use video clip as input stream, using 2xEVE and 2xDSP cores, based on model with single layers group
6./tidl_classification -g 1 -d 2 -e 2 -l ./imagenet.txt -s ./classlist.txt -i ./clips/test50.mp4 -c ./stream_config_j11_v2.txt 6./tidl_classification -g 1 -d 2 -e 2 -l ./imagenet.txt -s ./classlist.txt -i ./clips/test10.mp4 -c ./stream_config_j11_v2.txt
7# 3. Use video clip as input stream, using 2xEVE and 1xDSP cores, based on model with two layers group (1st layers group running on EVE, 2nd layers group on DSP) 7# 3. Use video clip as input stream, using 2xEVE and 1xDSP cores, based on model with two layers group (1st layers group running on EVE, 2nd layers group on DSP)
8./tidl_classification -g 2 -d 1 -e 2 -l ./imagenet.txt -s ./classlist.txt -i ./clips/test50.mp4 -c ./stream_config_j11_v2.txt 8./tidl_classification -g 2 -d 1 -e 2 -l ./imagenet.txt -s ./classlist.txt -i ./clips/test10.mp4 -c ./stream_config_j11_v2.txt
9# 4. Use video clip as input stream, using no EVEs and 2xDSP cores, based on model with single layers group 9# 4. Use video clip as input stream, using no EVEs and 2xDSP cores, based on model with single layers group
10./tidl_classification -g 1 -d 2 -e 0 -l ./imagenet.txt -s ./classlist.txt -i ./clips/test50.mp4 -c ./stream_config_j11_v2.txt 10./tidl_classification -g 1 -d 2 -e 0 -l ./imagenet.txt -s ./classlist.txt -i ./clips/test10.mp4 -c ./stream_config_j11_v2.txt
diff --git a/examples/test/testvecs/config/infer/tidl_config_dense_1x1.txt b/examples/test/testvecs/config/infer/tidl_config_dense_1x1.txt
index 475b89a..b41ceaa 100755
--- a/examples/test/testvecs/config/infer/tidl_config_dense_1x1.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_dense_1x1.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 0 2preProcType = 0
3inData = ../test/testvecs/input/000100_1024x512_bgr.y 3inData = "../test/testvecs/input/000100_1024x512_bgr.y"
4outData = "./stats_tool_out.bin" 4outData = "./stats_tool_out.bin"
5netBinFile = ../test/testvecs/config/tidl_models/tidl_net_dense_1x1.bin 5netBinFile = ../test/testvecs/config/tidl_models/tidl_net_dense_1x1.bin
6paramsBinFile = ../test/testvecs/config/tidl_models/tidl_param_dense_1x1.bin 6paramsBinFile = ../test/testvecs/config/tidl_models/tidl_param_dense_1x1.bin
diff --git a/examples/test/testvecs/config/infer/tidl_config_inceptionNetv1.txt b/examples/test/testvecs/config/infer/tidl_config_inceptionNetv1.txt
index 934cff6..2f9e152 100755
--- a/examples/test/testvecs/config/infer/tidl_config_inceptionNetv1.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_inceptionNetv1.txt
@@ -1,9 +1,9 @@
1numFrames = 1 1numFrames = 1
2preProcType = 2 2preProcType = 2
3inData = ../test/testvecs/input/preproc_2_224x224.y 3inData = "../test/testvecs/input/preproc_2_224x224.y"
4outData = "stats_tool_out.bin" 4outData = "stats_tool_out.bin"
5netBinFile = ../test/testvecs/config/tidl_models/tidl_inception_v1_net.bin 5netBinFile = ../test/testvecs/config/tidl_models/tidl_net_inceptionv1_224.bin
6paramsBinFile = ../test/testvecs/config/tidl_models/tidl_inception_v1_param.bin 6paramsBinFile = ../test/testvecs/config/tidl_models/tidl_param_inceptionv1_224.bin
7inWidth = 224 7inWidth = 224
8inHeight = 224 8inHeight = 224
9inNumChannels = 3 9inNumChannels = 3
diff --git a/examples/test/testvecs/config/infer/tidl_config_inceptionNetv1_lg2.txt b/examples/test/testvecs/config/infer/tidl_config_inceptionNetv1_lg2.txt
index b41294b..37856bb 100755
--- a/examples/test/testvecs/config/infer/tidl_config_inceptionNetv1_lg2.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_inceptionNetv1_lg2.txt
@@ -1,9 +1,9 @@
1numFrames = 1 1numFrames = 1
2preProcType = 2 2preProcType = 2
3inData = ../test/testvecs/input/preproc_2_224x224.y 3inData = "../test/testvecs/input/preproc_2_224x224.y"
4outData = "stats_tool_out.bin" 4outData = "stats_tool_out.bin"
5netBinFile = ../test/testvecs/config/tidl_models/tidl_inception_v1_net.bin 5netBinFile = ../test/testvecs/config/tidl_models/tidl_net_inceptionv1_224.bin
6paramsBinFile = ../test/testvecs/config/tidl_models/tidl_inception_v1_param.bin 6paramsBinFile = ../test/testvecs/config/tidl_models/tidl_param_inceptionv1_224.bin
7inWidth = 224 7inWidth = 224
8inHeight = 224 8inHeight = 224
9inNumChannels = 3 9inNumChannels = 3
diff --git a/examples/test/testvecs/config/infer/tidl_config_j11_bn.txt b/examples/test/testvecs/config/infer/tidl_config_j11_bn.txt
index 787bb2f..0cb37ee 100755
--- a/examples/test/testvecs/config/infer/tidl_config_j11_bn.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_j11_bn.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 0 2preProcType = 0
3inData = ../test/testvecs/input/preproc_0_224x224.y 3inData = "../test/testvecs/input/preproc_0_224x224.y"
4outData = "./stats_tool_out.bin" 4outData = "./stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_imagenet_jacintonet11v2_bn.bin" 5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_imagenet_jacintonet11v2_bn.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_imagenet_jacintonet11v2_bn.bin" 6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_imagenet_jacintonet11v2_bn.bin"
diff --git a/examples/test/testvecs/config/infer/tidl_config_j11_cifar.txt b/examples/test/testvecs/config/infer/tidl_config_j11_cifar.txt
index d6fc85b..bd35416 100755
--- a/examples/test/testvecs/config/infer/tidl_config_j11_cifar.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_j11_cifar.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 0 2preProcType = 0
3inData = ../test/testvecs/input/preproc_3_32x32.y 3inData = "../test/testvecs/input/preproc_3_32x32.y"
4outData = "./stats_tool_out.bin" 4outData = "./stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_cifar_jacintonet11v2.bin" 5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_cifar_jacintonet11v2.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_cifar_jacintonet11v2.bin" 6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_cifar_jacintonet11v2.bin"
diff --git a/examples/test/testvecs/config/infer/tidl_config_j11_controlLayers.txt b/examples/test/testvecs/config/infer/tidl_config_j11_controlLayers.txt
index 2bf703c..8d266f4 100755
--- a/examples/test/testvecs/config/infer/tidl_config_j11_controlLayers.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_j11_controlLayers.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 0 2preProcType = 0
3inData = ../test/testvecs/input/preproc_3_32x32.y 3inData = "../test/testvecs/input/preproc_3_32x32.y"
4outData = "stats_tool_out.bin" 4outData = "stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_jacintonet_cntrllayers.bin" 5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_jacintonet_cntrllayers.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_jacintonet_cntrllayers.bin" 6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_jacintonet_cntrllayers.bin"
diff --git a/examples/test/testvecs/config/infer/tidl_config_j11_prelu.txt b/examples/test/testvecs/config/infer/tidl_config_j11_prelu.txt
index 0a4c377..c03f724 100755
--- a/examples/test/testvecs/config/infer/tidl_config_j11_prelu.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_j11_prelu.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 0 2preProcType = 0
3inData = ../test/testvecs/input/preproc_0_224x224.y 3inData = "../test/testvecs/input/preproc_0_224x224.y"
4outData = "stats_tool_out.bin" 4outData = "stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_imagenet_jacintonet11v2_prelu.bin" 5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_imagenet_jacintonet11v2_prelu.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_imagenet_jacintonet11v2_prelu.bin" 6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_imagenet_jacintonet11v2_prelu.bin"
diff --git a/examples/test/testvecs/config/infer/tidl_config_j11_v2.txt b/examples/test/testvecs/config/infer/tidl_config_j11_v2.txt
index 184ba7a..79bdd95 100755
--- a/examples/test/testvecs/config/infer/tidl_config_j11_v2.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_j11_v2.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 0 2preProcType = 0
3inData = ../test/testvecs/input/preproc_0_224x224.y 3inData = "../test/testvecs/input/preproc_0_224x224.y"
4outData = "stats_tool_out.bin" 4outData = "stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_imagenet_jacintonet11v2.bin" 5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_imagenet_jacintonet11v2.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_imagenet_jacintonet11v2.bin" 6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_imagenet_jacintonet11v2.bin"
diff --git a/examples/test/testvecs/config/infer/tidl_config_j11_v2_dense.txt b/examples/test/testvecs/config/infer/tidl_config_j11_v2_dense.txt
index a449ece..786879d 100755
--- a/examples/test/testvecs/config/infer/tidl_config_j11_v2_dense.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_j11_v2_dense.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 0 2preProcType = 0
3inData = ../test/testvecs/input/preproc_0_224x224.y 3inData = "../test/testvecs/input/preproc_0_224x224.y"
4outData = "stats_tool_out.bin" 4outData = "stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_imagenet_jacintonet11v2_dense.bin" 5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_imagenet_jacintonet11v2_dense.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_imagenet_jacintonet11v2_dense.bin" 6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_imagenet_jacintonet11v2_dense.bin"
diff --git a/examples/test/testvecs/config/infer/tidl_config_j11_v2_dense_lg2.txt b/examples/test/testvecs/config/infer/tidl_config_j11_v2_dense_lg2.txt
index e4f33a5..0e5c899 100755
--- a/examples/test/testvecs/config/infer/tidl_config_j11_v2_dense_lg2.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_j11_v2_dense_lg2.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 0 2preProcType = 0
3inData = ../test/testvecs/input/preproc_0_224x224.y 3inData = "../test/testvecs/input/preproc_0_224x224.y"
4outData = "stats_tool_out.bin" 4outData = "stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_imagenet_jacintonet11v2_dense.bin" 5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_imagenet_jacintonet11v2_dense.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_imagenet_jacintonet11v2_dense.bin" 6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_imagenet_jacintonet11v2_dense.bin"
diff --git a/examples/test/testvecs/config/infer/tidl_config_j11_v2_lg2.txt b/examples/test/testvecs/config/infer/tidl_config_j11_v2_lg2.txt
index 25983b3..7e821b9 100755
--- a/examples/test/testvecs/config/infer/tidl_config_j11_v2_lg2.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_j11_v2_lg2.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 0 2preProcType = 0
3inData = ../test/testvecs/input/preproc_0_224x224.y 3inData = "../test/testvecs/input/preproc_0_224x224.y"
4outData = "stats_tool_out.bin" 4outData = "stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_imagenet_jacintonet11v2.bin" 5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_imagenet_jacintonet11v2.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_imagenet_jacintonet11v2.bin" 6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_imagenet_jacintonet11v2.bin"
diff --git a/examples/test/testvecs/config/infer/tidl_config_jseg21.txt b/examples/test/testvecs/config/infer/tidl_config_jseg21.txt
index ce76270..9768359 100755
--- a/examples/test/testvecs/config/infer/tidl_config_jseg21.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_jseg21.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 0 2preProcType = 0
3inData = ../test/testvecs/input/000100_1024x512_bgr.y 3inData = "../test/testvecs/input/000100_1024x512_bgr.y"
4outData = "./stats_tool_out.bin" 4outData = "./stats_tool_out.bin"
5netBinFile = ../test/testvecs/config/tidl_models/tidl_net_jsegnet21v2.bin 5netBinFile = ../test/testvecs/config/tidl_models/tidl_net_jsegnet21v2.bin
6paramsBinFile = ../test/testvecs/config/tidl_models/tidl_param_jsegnet21v2.bin 6paramsBinFile = ../test/testvecs/config/tidl_models/tidl_param_jsegnet21v2.bin
diff --git a/examples/test/testvecs/config/infer/tidl_config_jseg21_dense.txt b/examples/test/testvecs/config/infer/tidl_config_jseg21_dense.txt
index 357e1e7..35e6611 100755
--- a/examples/test/testvecs/config/infer/tidl_config_jseg21_dense.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_jseg21_dense.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 0 2preProcType = 0
3inData = ../test/testvecs/input/000100_1024x512_bgr.y 3inData = "../test/testvecs/input/000100_1024x512_bgr.y"
4outData = "./stats_tool_out.bin" 4outData = "./stats_tool_out.bin"
5netBinFile = ../test/testvecs/config/tidl_models/tidl_net_jseg21_cityscapes_dense.bin 5netBinFile = ../test/testvecs/config/tidl_models/tidl_net_jseg21_cityscapes_dense.bin
6paramsBinFile = ../test/testvecs/config/tidl_models/tidl_param_jseg21_cityscapes_dense.bin 6paramsBinFile = ../test/testvecs/config/tidl_models/tidl_param_jseg21_cityscapes_dense.bin
diff --git a/examples/test/testvecs/config/infer/tidl_config_jseg21_tiscapes.txt b/examples/test/testvecs/config/infer/tidl_config_jseg21_tiscapes.txt
index fdf2422..b3053f7 100755
--- a/examples/test/testvecs/config/infer/tidl_config_jseg21_tiscapes.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_jseg21_tiscapes.txt
@@ -1,6 +1,6 @@
1numFrames = 9 1numFrames = 9
2preProcType = 0 2preProcType = 0
3inData = ../test/testvecs/input/000100_1024x512_bgr.y 3inData = "../test/testvecs/input/000100_1024x512_bgr.y"
4outData = "./stats_tool_out.bin" 4outData = "./stats_tool_out.bin"
5netBinFile = ../test/testvecs/config/tidl_models/jsegnet21/tidl_net_jsegnet21v2.bin 5netBinFile = ../test/testvecs/config/tidl_models/jsegnet21/tidl_net_jsegnet21v2.bin
6paramsBinFile = ../test/testvecs/config/tidl_models/jsegnet21/tidl_param_jsegnet21v2.bin 6paramsBinFile = ../test/testvecs/config/tidl_models/jsegnet21/tidl_param_jsegnet21v2.bin
diff --git a/examples/test/testvecs/config/infer/tidl_config_mnist_lenet.txt b/examples/test/testvecs/config/infer/tidl_config_mnist_lenet.txt
index f4b0b7f..e05c933 100755
--- a/examples/test/testvecs/config/infer/tidl_config_mnist_lenet.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_mnist_lenet.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 0 2preProcType = 0
3inData = ../test/testvecs/input/digits10_images_28x28.y 3inData = "../test/testvecs/input/digits10_images_28x28.y"
4outData = "stats_tool_out.bin" 4outData = "stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_mnist_lenet.bin" 5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_mnist_lenet.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_mnist_lenet.bin" 6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_mnist_lenet.bin"
diff --git a/examples/test/testvecs/config/infer/tidl_config_mobileNet1.txt b/examples/test/testvecs/config/infer/tidl_config_mobileNet1.txt
index 094b697..17c20bf 100755
--- a/examples/test/testvecs/config/infer/tidl_config_mobileNet1.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_mobileNet1.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 2 2preProcType = 2
3inData = ../test/testvecs/input/preproc_2_224x224.y 3inData = "../test/testvecs/input/preproc_2_224x224.y"
4outData = "./stats_tool_out.bin" 4outData = "./stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_mobilenet_1_224.bin" 5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_mobilenet_1_224.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_mobilenet_1_224.bin" 6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_mobilenet_1_224.bin"
diff --git a/examples/test/testvecs/config/infer/tidl_config_mobileNet1_lg2.txt b/examples/test/testvecs/config/infer/tidl_config_mobileNet1_lg2.txt
index c532ed1..0c13965 100755
--- a/examples/test/testvecs/config/infer/tidl_config_mobileNet1_lg2.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_mobileNet1_lg2.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 2 2preProcType = 2
3inData = ../test/testvecs/input/preproc_2_224x224.y 3inData = "../test/testvecs/input/preproc_2_224x224.y"
4outData = "./stats_tool_out.bin" 4outData = "./stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_mobilenet_1_224.bin" 5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_mobilenet_1_224.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_mobilenet_1_224.bin" 6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_mobilenet_1_224.bin"
diff --git a/examples/test/testvecs/config/infer/tidl_config_mobileNet2.txt b/examples/test/testvecs/config/infer/tidl_config_mobileNet2.txt
new file mode 100755
index 0000000..f163716
--- /dev/null
+++ b/examples/test/testvecs/config/infer/tidl_config_mobileNet2.txt
@@ -0,0 +1,9 @@
1numFrames = 1
2preProcType = 2
3inData = "../test/testvecs/input/preproc_2_224x224.y"
4outData = "./stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_mobilenet_2_224.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_mobilenet_2_224.bin"
7inWidth = 224
8inHeight = 224
9inNumChannels = 3
diff --git a/examples/test/testvecs/config/infer/tidl_config_mobileNet2_lg2.txt b/examples/test/testvecs/config/infer/tidl_config_mobileNet2_lg2.txt
new file mode 100755
index 0000000..ed36dfb
--- /dev/null
+++ b/examples/test/testvecs/config/infer/tidl_config_mobileNet2_lg2.txt
@@ -0,0 +1,10 @@
1numFrames = 1
2preProcType = 2
3inData = "../test/testvecs/input/preproc_2_224x224.y"
4outData = "./stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_mobilenet_2_224.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_mobilenet_2_224.bin"
7inWidth = 224
8inHeight = 224
9inNumChannels = 3
10layerIndex2LayerGroupId = { {63, 2}, {64, 2}, {65, 2} }
diff --git a/examples/test/testvecs/config/infer/tidl_config_smallRoi.txt b/examples/test/testvecs/config/infer/tidl_config_smallRoi.txt
index e6258de..9f8d56e 100755
--- a/examples/test/testvecs/config/infer/tidl_config_smallRoi.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_smallRoi.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 0 2preProcType = 0
3inData = ../test/testvecs/input/000100_1024x512_bgr.y 3inData = "../test/testvecs/input/000100_1024x512_bgr.y"
4outData = "./stats_tool_out.bin" 4outData = "./stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_dense_varibale_block_size.bin" 5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_dense_varibale_block_size.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_dense_varibale_block_size.bin" 6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_dense_varibale_block_size.bin"
diff --git a/examples/test/testvecs/config/infer/tidl_config_squeeze1_1.txt b/examples/test/testvecs/config/infer/tidl_config_squeeze1_1.txt
index b599e69..911180e 100755
--- a/examples/test/testvecs/config/infer/tidl_config_squeeze1_1.txt
+++ b/examples/test/testvecs/config/infer/tidl_config_squeeze1_1.txt
@@ -1,6 +1,6 @@
1numFrames = 1 1numFrames = 1
2preProcType = 1 2preProcType = 1
3inData = ../test/testvecs/input/preproc_1_227x227.y 3inData = "../test/testvecs/input/preproc_1_227x227.y"
4outData = "./stats_tool_out.bin" 4outData = "./stats_tool_out.bin"
5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_squeezeNet1.1.bin" 5netBinFile = "../test/testvecs/config/tidl_models/tidl_net_squeezeNet1.1.bin"
6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_squeezeNet1.1.bin" 6paramsBinFile = "../test/testvecs/config/tidl_models/tidl_param_squeezeNet1.1.bin"
diff --git a/examples/test/testvecs/config/tidl_models/tidl_inception_v1_net.bin b/examples/test/testvecs/config/tidl_models/tidl_net_inceptionv1_224.bin
index 3860004..96dc888 100644
--- a/examples/test/testvecs/config/tidl_models/tidl_inception_v1_net.bin
+++ b/examples/test/testvecs/config/tidl_models/tidl_net_inceptionv1_224.bin
Binary files differ
diff --git a/examples/test/testvecs/config/tidl_models/tidl_net_mobilenet_1_224.bin b/examples/test/testvecs/config/tidl_models/tidl_net_mobilenet_1_224.bin
index 44950df..7933c7a 100644
--- a/examples/test/testvecs/config/tidl_models/tidl_net_mobilenet_1_224.bin
+++ b/examples/test/testvecs/config/tidl_models/tidl_net_mobilenet_1_224.bin
Binary files differ
diff --git a/examples/test/testvecs/config/tidl_models/tidl_net_mobilenet_2_224.bin b/examples/test/testvecs/config/tidl_models/tidl_net_mobilenet_2_224.bin
new file mode 100755
index 0000000..9aacebe
--- /dev/null
+++ b/examples/test/testvecs/config/tidl_models/tidl_net_mobilenet_2_224.bin
Binary files differ
diff --git a/examples/test/testvecs/config/tidl_models/tidl_inception_v1_param.bin b/examples/test/testvecs/config/tidl_models/tidl_param_inceptionv1_224.bin
index 5f395de..5f395de 100644
--- a/examples/test/testvecs/config/tidl_models/tidl_inception_v1_param.bin
+++ b/examples/test/testvecs/config/tidl_models/tidl_param_inceptionv1_224.bin
diff --git a/examples/test/testvecs/config/tidl_models/tidl_param_mobilenet_2_224.bin b/examples/test/testvecs/config/tidl_models/tidl_param_mobilenet_2_224.bin
new file mode 100755
index 0000000..8eab5ee
--- /dev/null
+++ b/examples/test/testvecs/config/tidl_models/tidl_param_mobilenet_2_224.bin
Binary files differ
diff --git a/tidl_api/src/ocl_device.cpp b/tidl_api/src/ocl_device.cpp
index 867d742..33671ac 100644
--- a/tidl_api/src/ocl_device.cpp
+++ b/tidl_api/src/ocl_device.cpp
@@ -452,7 +452,7 @@ Device::Ptr Device::Create(DeviceType core_type, const DeviceIds& ids,
452} 452}
453 453
454// Minimum version of OpenCL required for this version of TIDL API 454// Minimum version of OpenCL required for this version of TIDL API
455#define MIN_OCL_VERSION "01.01.18.00" 455#define MIN_OCL_VERSION "01.01.19.00"
456static bool CheckOpenCLVersion(cl_platform_id id) 456static bool CheckOpenCLVersion(cl_platform_id id)
457{ 457{
458 cl_int err; 458 cl_int err;