rbgirshick / py-faster-rcnn

Faster R-CNN (Python implementation) -- see https://github.com/ShaoqingRen/faster_rcnn for the official MATLAB version
Other
8.13k stars 4.11k forks source link

Same score for each bbox after compressing the model #92

Open JoeLoveFannie opened 8 years ago

JoeLoveFannie commented 8 years ago

I train a model for face detection and it works well until I compress it by truncated SVD. I use the compress.py provided by faster-rcnn and modify faster_rcnn_test.pt to its svd version: faster_rcnn_test.pt: layer { name: "fc6" type: "InnerProduct" bottom: "roi_pool_conv5" top: "fc6" inner_product_param { num_output: 4096 } }

faster_rcnn_test_svd.pt: layer { name: "fc6L" type: "InnerProduct" bottom: "roi_pool_conv5" top: "fc6L" inner_product_param { num_output: 1024 } } layer { name: "fc6U" type: "InnerProduct" bottom: "fc6L" top: "fc6U" inner_product_param { num_output: 4096 } }

I do the same for fc7 with the top 256 singular values. But I find that there are much more bboxes predicted and the scores of them are all 67.1%. I can't find the reason. Need help.

Arsey commented 7 years ago

@JoeLoveFannie which model do you use? If VGG16 I would recommend to compare these two files to see what you need to change: https://raw.githubusercontent.com/rbgirshick/fast-rcnn/master/models/VGG16/compressed/test.prototxt https://raw.githubusercontent.com/rbgirshick/fast-rcnn/master/models/VGG16/test.prototxt