question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem in RCNN.ROI_SAMPLE_JIT=False

See original GitHub issue

Thanks a lot for your fabulous work ! Your code works well when ROI_SAMPLE_JIT=True. But a problem happens in /lib/net/rcnn_net.py when ROI_SAMPLE_JIT = False, which may relate to tensor size :

  xyz_input = pts_input[..., 0:self.rcnn_input_channel].transpose(1, 2).unsqueeze(dim=3)
  xyz_feature = self.xyz_up_layer(xyz_input)
  rpn_feature = pts_input[..., self.rcnn_input_channel:].transpose(1, 2).unsqueeze(dim=3)
  merged_feature = torch.cat((xyz_feature, rpn_feature), dim=1)
  merged_feature = self.merge_down_layer(merged_feature)
  l_xyz, l_features = [xyz], [merged_feature.squeeze(dim=3)]

In my case(default as you recommend), the processed xyz_input is a [4, 512, 64, 1, 5] tensor, which can’t be processed by the sharedMLP(128,5,1,1 conv indeed): RuntimeError: Expected 4-dimensional input for 4-dimensional weight [128, 5, 1, 1], but got 5-dimensional input of size [4, 512, 64, 1, 5] instead

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
wei-OHKcommented, Jun 18, 2019

No, the released code is more clear than the original code since I have re-implemented it to make it easy to understand, but they have exactly the same network. The pretrained model is trained by saving the RoIs and the features out, which are then used by training the RCNN stage. I think the main differences are that I shuffle all the RoIs when training RCNN stage (it needs 50G+ CPU memory to load all the saved features and lots of people don’t have this condition, so I re-implemented it like the released codes to benefit more peoples. ) I have trained several networks before I released the codes, and the best moderate 3D AP is about 78.4 with ROI_SAMPLE_JIT=False.

Hi shaoshuai Thank you for the nice paper and code. I faced the same problem. And I am just wondering if it is possible for us to learn more details about your implementation (e.g. how did you shuffle all the RoIs when training RCNN). Probably those details can further help us improve our models. Thanks a lot in advance!

2reactions
yinjunbocommented, May 26, 2019

I’ve tried it twice that training with ROI_SAMPLE_JIT=False and exactly followed all the instructions, however, every time it reports as bellow. RuntimeError: Expected 4-dimensional input for 4-dimensional weight [128, 5, 1, 1], but got 5-dimensional input of size [4, 512, 64, 1, 5] instead. All the settings are exactly the same with the one ROI_SAMPLE_JIT=True , except for ROI_SAMPLE_JIT=False , so is there something I missed?

Read more comments on GitHub >

github_iconTop Results From Across the Web

R-CNN, Fast R-CNN, Faster R-CNN, YOLO — Object ...
The problem with this approach is that the objects of interest might have different spatial locations within the image and different aspect ......
Read more >
Faster RCNN - Problem Statement | CNN | Object Detection
What is the problem that Faster RCNN trying to solve?We ended the last chapter on Fast RCNN by wondering if there is way...
Read more >
R-CNN (Object Detection) - Medium
The problem the R-CNN system tries to solve it is to locate objects in an image (object detection). What do you do to...
Read more >
Object detection flow using R-CNN The problems with this ...
Object detection flow using R-CNN The problems with this approach are that it takes a huge time to train as it has to...
Read more >
Faster R-CNN Explained for Object Detection Tasks
Moreover, this algorithm cannot be customized to the detection problem. Each region proposal is fed independently to the CNN for feature extraction. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found