Commit a7ad78b9 authored by Pavel Rojtberg's avatar Pavel Rojtberg

cnn_3dobj: use ocv_add_testdata

parent ba1973d2
...@@ -33,6 +33,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) ...@@ -33,6 +33,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${Caffe_INCLUDE_DIR}) include_directories(${Caffe_INCLUDE_DIR})
set(the_description "CNN for 3D object recognition and pose estimation including a completed Sphere View on 3D objects") set(the_description "CNN for 3D object recognition and pose estimation including a completed Sphere View on 3D objects")
ocv_define_module(cnn_3dobj opencv_core opencv_imgproc ${Caffe_LIBS} ${Glog_LIBS} ${Protobuf_LIBS} OPTIONAL opencv_features2d opencv_viz opencv_calib3d WRAP python) ocv_define_module(cnn_3dobj opencv_core opencv_imgproc ${Caffe_LIBS} ${Glog_LIBS} ${Protobuf_LIBS} OPTIONAL opencv_features2d opencv_viz opencv_calib3d WRAP python)
ocv_add_testdata(testdata/cv contrib/cnn_3dobj)
if(TARGET opencv_test_cnn_3dobj) if(TARGET opencv_test_cnn_3dobj)
target_link_libraries(opencv_test_cnn_3dobj boost_system) target_link_libraries(opencv_test_cnn_3dobj boost_system)
......
...@@ -26,11 +26,11 @@ CV_CNN_Feature_Test::CV_CNN_Feature_Test() ...@@ -26,11 +26,11 @@ CV_CNN_Feature_Test::CV_CNN_Feature_Test()
*/ */
void CV_CNN_Feature_Test::run(int) void CV_CNN_Feature_Test::run(int)
{ {
String caffemodel = String(ts->get_data_path()) + "3d_triplet_iter_30000.caffemodel"; String caffemodel = cvtest::findDataFile("contrib/cnn_3dobj/3d_triplet_iter_30000.caffemodel");
String network_forIMG = cvtest::TS::ptr()->get_data_path() + "3d_triplet_testIMG.prototxt"; String network_forIMG = cvtest::findDataFile("contrib/cnn_3dobj/3d_triplet_testIMG.prototxt");
String mean_file = "no"; String mean_file = "no";
std::vector<String> ref_img; std::vector<String> ref_img;
String target_img = String(ts->get_data_path()) + "4_78.png"; String target_img = cvtest::findDataFile("contrib/cnn_3dobj/4_78.png");
String feature_blob = "feat"; String feature_blob = "feat";
String device = "CPU"; String device = "CPU";
int dev_id = 0; int dev_id = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment