How do we run test.sh on test dir?
judyqiu1996 opened this issue · comments
I found the test dataset and training dataset are the same. So the first time I run the model and run the test.sh, I found the accuracy is about 90%. So I split training set to 2 parts (train and test) and want to run test.sh on the test dataset. But it will always showing it will get img from training dir.
Something like this
File "test_net.py", line 69, in <module>
imdb, roidb, ratio_list, ratio_index = combined_roidb('kitti_val', False)
File "/home/yujiaq3/Stereo-RCNN/lib/roi_data_layer/roidb.py", line 123, in combined_roidb
roidbs = [get_roidb(s) for s in imdb_names.split('+')]
File "/home/yujiaq3/Stereo-RCNN/lib/roi_data_layer/roidb.py", line 115, in get_roidb
print("get_roidb start",imdb_name, len(imdb.roidb), imdb.roidb)
File "/home/yujiaq3/Stereo-RCNN/lib/datasets/imdb.py", line 77, in roidb
self._roidb = self.roidb_handler()
File "/home/yujiaq3/Stereo-RCNN/lib/datasets/kitti.py", line 134, in gt_roidb
for index in self.image_index]
File "/home/yujiaq3/Stereo-RCNN/lib/datasets/kitti.py", line 209, in _load_kitti_annotation
objects_origin = kitti_utils.read_obj_data(filename, calib_it, im_left.shape)
File "/home/yujiaq3/Stereo-RCNN/lib/model/utils/kitti_utils.py", line 173, in read_obj_data
detection_data = open(LABEL_PATH, 'r')
IOError: [Errno 2] No such file or directory: './data/kitti/object/training/label_2/007000.txt'
And also I met this problem,
./data/kitti/object/training/calib/007000.txt
Traceback (most recent call last):
File "test_net.py", line 296, in <module>
calib, alpha, dim, box_left, box_right, cls_kpts[detect_idx])
File "/home/yujiaq3/Stereo-RCNN/lib/model/utils/box_estimator.py", line 216, in solve_x_y_z_theta_from_kpt
alpha = kpt2alpha(kpt_pos, kpt_type, box_left)
File "/home/yujiaq3/Stereo-RCNN/lib/model/utils/box_estimator.py", line 159, in kpt2alpha
alpha = -m.pi/2 - m.asin(clamp((kpt_pos-box[0])/box_width,-1,1)) # 0 -> -90, 1 -> -180
TypeError: sub() received an invalid combination of arguments - got (numpy.float32), but expected one of:
* (Tensor other, Number alpha)
* (Number other, Number alpha)
Same question
It is beyond logic and above reason
Since the label of the test set is not publicly available, we split the training set into train and validation split following the previous work. We provide the training split in the data folder, which are commonly used in extensive 3D object detection works. You don't need to split the training set by yourself.
The second issue is due to the incompatibility between PyTorch tensor and numpy.array. Please make sure your pytorch version is consistent with we specified in the readme, or convert thet data type handly.
Since the label of the test set is not publicly available, we split the training set into train and validation split following the previous work. We provide the training split in the data folder, which are commonly used in extensive 3D object detection works. You don't need to split the training set by yourself.
The second issue is due to the incompatibility between PyTorch tensor and numpy.array. Please make sure your pytorch version is consistent with we specified in the readme, or convert thet data type handly.
Thanks for answers.
How to use the model on my own data?
Did anyone figure out how to get it to work on your own test data?