Closed NLCharles closed 5 years ago
I have solved that by changing the extra_choice = np.random.choice(choice, self.npoints - len(pts_rect), replace=True)
since the random choice of required points can't be picked if no replacement when it's more than samples, thus have to switch to true. Moreover, if your number of sample points is way less compared to KITTI
such as in NuScenes
you gotta tweak many things, which I'm also working on to get sufficient accuracy results :)
Thanks. May you give me some hints on how to fine tune the model on a small dataset for specific purpose?
I also try to train the model on my own dataset, I didn't have the problem as u said since my points are 6 times more than KITTI. I do found some hyper-parameters, i.e. LOC_SCOPE, LOC_BIN_SIZE, CLS_MEAN_SIZE
I'm also experimenting tbh, but I can recommend reducing the number of sample points NUM_POINTS
in RPN
of cfg
around something the mean of the sample point number of your data, closest value maybe to a power of 2.
I also try to train the model on my own dataset, I didn't have the problem as u said since my points are 6 times more than KITTI. I do found some hyper-parameters, i.e. LOC_SCOPE, LOC_BIN_SIZE, CLS_MEAN_SIZE
Those are more class-related if that's your purpose I recommend to follow PointPillars
paper setting definition. On the tweaking for the data side, even the augmentation settings would affect the results I would say, so many tweaks to be done.
OK. Thank you very much. One last question: Is it correct to infer on a different dataset with the model trained on KITTI by only changing the paths of dataloader functions in kittidataset.py? No more actions on augmented scenes or rpn features?
I also try to train the model on my own dataset, I didn't have the problem as u said since my points are 6 times more than KITTI. I do found some hyper-parameters, i.e. LOC_SCOPE, LOC_BIN_SIZE, CLS_MEAN_SIZE
Make sense, since the line the script crashed is all about sample numbers. BTW, do you use the default parameters in the config file?
OK. Thank you very much. One last question: Is it correct to infer on a different dataset with the model trained on KITTI by only changing the paths of dataloader functions in kittidataset.py? No more actions on augmented scenes or rpn features?
Using KITTI
pre-trained model is indeed fine if your data is coming from a similar distribution which you can ensure that by the inference eval results. I don't get the second part of your question.
I also try to train the model on my own dataset, I didn't have the problem as u said since my points are 6 times more than KITTI. I do found some hyper-parameters, i.e. LOC_SCOPE, LOC_BIN_SIZE, CLS_MEAN_SIZE
Make sense, since the line the script crashed is all about sample numbers. BTW, do you use the default parameters in the config file?
I modified some items I said before. My dataset is consist of depth images captured by binocular camera and then I transformed these depth images to point clouds. Maybe both of us should follow PointPillars paper setting definition as recommended.
OK. Thank you very much. One last question: Is it correct to infer on a different dataset with the model trained on KITTI by only changing the paths of dataloader functions in kittidataset.py? No more actions on augmented scenes or rpn features?
Using
KITTI
pre-trained model is indeed fine if your data is coming from a similar distribution which you can ensure that by the inference eval results. I don't get the second part of your question.
Excuse me for unable to make it clear. I trained the rcnn with offline method so finetuning the network may call for actions on the data (but I changed it to online, so it's not an issue now). If I want to finetune RPN I might need to do the same thing. Is the checkpoint of an rcnn the only parameter file we need to evaluate, finetune or infer on a dataset? What about rpn? (including the default.yaml)
OK. Thank you very much. One last question: Is it correct to infer on a different dataset with the model trained on KITTI by only changing the paths of dataloader functions in kittidataset.py? No more actions on augmented scenes or rpn features?
Using
KITTI
pre-trained model is indeed fine if your data is coming from a similar distribution which you can ensure that by the inference eval results. I don't get the second part of your question.Excuse me for unable to make it clear. I trained the rcnn with offline method so finetuning the network may call for actions on the data (but I changed it to online, so it's not an issue now). If I want to finetune RPN I might need to do the same thing. Is the checkpoint of an rcnn the only parameter file we need to evaluate, finetune or infer on a dataset? What about rpn? (including the default.yaml)
Indeed you can update some params in RPN
side but better consult PointNet++
paper. And as I have mentioned before you better update the number of points if the average number of points in your samples is different drastically which is also in the RPN
side of config.
I set a flag to ignore the image input. Unfortunately the rpn couldn't get the correct samples.
Where is this flag set? I can't find it. Having issues getting the network to ignore images.
Hello, developers. I trained the model on KITTI object dataset and I tried to use it on another point cloud dataset, but the dataloader crashed. May you give some advice on this issus? I made my point cloud dataset KITTI-like: it has identity calibration file and lidar and label folders. but no pictures. I set a flag to ignore the image input. Unfortunately the rpn couldn't get the correct samples. File ".../PointRCNN-master/tools/../lib/datasets/kitti_rcnn_dataset.py", line 238, in getitem return self.get_rpn_sample(index) File ".../PointRCNN-master/tools/../lib/datasets/kitti_rcnn_dataset.py", line 304, in get_rpn_sample extra_choice = np.random.choice(choice, self.npoints - len(pts_rect), replace=False) File "mtrand.pyx", line 1168, in mtrand.RandomState.choice ValueError: Cannot take a larger sample than population when 'replace=False'