uzh-rpg / vilib

CUDA Visual Library by RPG
Other
428 stars 89 forks source link

TEST_IMAGE_LIST_EUROC_4000_3000 #8

Closed xds95 closed 4 years ago

xds95 commented 4 years ago

Hi, I have rewrited a cmakelists.txt and run the demo. I am able to run the example normally and also reproduce the effect correctly. Now I want to try to use my own data set, imitating the content in create_feature_detector_evaluation_data.sh, and generated image_list_4000_3000.txt, but when I run the test code, the following error appears, what is the problem?

/home/xds/Documents/code/vilib/visual_lib/tests_demo
### Image Pyramid
 CPU (w/o. preallocated array)      : min: 365, max: 526, avg: 394.57 usec
 GPU Device (w. preallocated array) : min: 11.36, max: 28.608, avg: 13.2752 usec
 GPU Host (w. preallocated array)   : min: 10, max: 27, avg: 11.47 usec
 Success: OK
### SubframePool
 Pool creation (with 10 frames)     : min: 367, max: 4085, avg: 505.84 usec
 Preallocated access                : min: 0, max: 5, avg: 0.328 usec
 New allocation                     : min: 2, max: 7993, avg: 43.1495 usec
 Success: OK
### PyramidPool
 Pool creation (with 10 frames)     : min: 590, max: 1803, avg: 731.74 usec
 Preallocated access                : min: 2, max: 19, avg: 2.82 usec
 New allocation                     : min: 14, max: 707, avg: 67.7765 usec
 Success: OK
### FAST detector
CUDA Error: invalid argument (err_num=1)
File: /tmp/tmp.O1K1K5c0YU/src/storage/opencv.cpp | Line: 82
tests_demo: /tmp/tmp.O1K1K5c0YU/src/storage/opencv.cpp:82: void vilib::opencv_copy_from_image_common(const cv::Mat&, unsigned char*, unsigned int, bool, cudaStream_t, cudaMemcpyKind): Assertion `0' failed.

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

and there is my image_list_4000_3000.txt:

4000
3000
test/images/euroc/images/4000_3000/2020_04_09_14_32_05_001119.jpg
test/images/euroc/images/4000_3000/2020_04_09_14_32_05_001120.jpg
test/images/euroc/images/4000_3000/2020_04_09_14_32_05_001121.jpg
test/images/euroc/images/4000_3000/2020_04_09_14_32_05_001122.jpg
test/images/euroc/images/4000_3000/2020_04_09_14_32_05_001123.jpg
test/images/euroc/images/4000_3000/2020_04_09_14_32_05_001124.jpg
test/images/euroc/images/4000_3000/2020_04_09_14_32_05_001125.jpg
...
...

83 pictures in total

There is the define:

// Frame preprocessing
#define PYRAMID_LEVELS                       1
#define PYRAMID_MIN_LEVEL                    0
#define PYRAMID_MAX_LEVEL                    PYRAMID_LEVELS

// FAST detector parameters
#define FAST_EPSILON                         (10.0f)
#define FAST_MIN_ARC_LENGTH                  10
// Remark: the Rosten CPU version only works with 
//         SUM_OF_ABS_DIFF_ON_ARC and MAX_THRESHOLD
#define FAST_SCORE                           SUM_OF_ABS_DIFF_ON_ARC

// NMS parameters
#define HORIZONTAL_BORDER                    0
#define VERTICAL_BORDER                      0
#define CELL_SIZE_WIDTH                      32
#define CELL_SIZE_HEIGHT                     32

// Test framework options
#define DISPLAY_PYRAMID_CPU                  0
#define DISPLAY_DETECTED_FEATURES_CPU        0
#define DISPLAY_DETECTED_FEATURES_GPU        1 // 显示GPU结果
#define ENABLE_CPU_VERSION                   1
#define ENABLE_GPU_VERSION                   1
// Remark: the subset verification only works with the scores mentioned above
//         for the CPU version
#define ENABLE_SUBSET_VERIFICATION           1
#define ENABLE_SUBSET_VERIFICATION_MSG       1
#define ENABLE_SUBSET_VERIFICATION_IMG       0
#define ENABLE_SUBSET_VERIFICATION_IMG_SAVE  0

// Test framework statistics
#define STAT_ID_DETECTOR_TIMER               0
#define STAT_ID_FEATURE_COUNT                1
xds95 commented 4 years ago

I got the size wrong, it's a 3000x4000 picture, not a 4000x3000 picture...

baliika commented 4 years ago

Thanks for the quick resolution of the problem.