-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ssd+squeezenet #1
Comments
@kaishijeng I believe the complexity of squeezenet in terms of flops is ~800 Million (though not sure, need to run it through complexity module) and the corresponding top1 accuracy on imagenet is ~58%, its advantage is lesser no of params (which affects memory and not speed). In comparison, thin resnet 50 (or resnet_50_1by2) which I trained has ~10k M flops with top1 accuracy of 66.79 on imagenet. See this comparison table. I had run experiment to train resnet_50_1by2 with SSD and got around 64-65% mAP on voc dataset, as compared to 70.4 using full resnet 50 described here. If you want even faster network (and not smaller in size), I suppose using tweaked resnet variants could be useful. |
Jay, Thanks for the info about squeezenet vs resnet50. My understanding is Do you have speed comparison between ssd+vgg16 vs ssd+resnet50? Thanks, On Mon, Aug 8, 2016 at 11:12 PM, Jay Mahadeokar notifications@github.com
|
Please refer this table for ssd+vgg16 and ssd+resnet50. I have also shared the caffemodel.. This table also compares resnet 50 and resnet_50_1by2. Though I havent yet added model files object detection using for resnet_50_1by2 + ssd, it should be easy to train it (since I have added the model pre-trained on imagenet). Let me know if the training ssd+resnet doc is sufficient, or you run into any bugs. |
According to your table, ssd+resnet50 shpould be 2 or 3 times faster than Thanks, On Tue, Aug 9, 2016 at 12:05 AM, Jay Mahadeokar notifications@github.com
|
I haven't done thorough benchmarking on cpu, since I only tested validation set on gpu machines. but I guess that should be true! I will run it on CPU and will update here. |
Jay No need to benchmark on CPU because I have a GPU, TitanX. python app/ssd/create_ssdnet.py --type Resnet -n 256 -b 3 4 6 3 --no-fc_layers -m bottleneck --extra_blocks 3 3 --extra_num_outputs 2048 2048 --mbox_source_layers relu_stage1_block3 relu_stage2_block5 relu_stage3_block2 relu_stage4_block2 relu_stage5_block2 pool_last --extra_layer_attach pool -c 21 -o ./ Thanks, |
--extra_num_outputs could be reduced to 1024 1024, and -n to 128. Rest of the params should remain same I think. Use -h for more help on params. |
@kaishijeng did the above params work for you? I am closing this for now, feel free to re-open it if you have additional questions. |
Jay, Yes, it works Thanks |
Jay, I am able to train ssd_resent50 and ssd_resnet50_1by2 and try out inference on TitanX and Jetson TX1. Thanks, |
@kaishijeng If you want to try some experiments, id suggest:
Please give it a try and I can help out if you have any further questions. |
Jay,
I plan to use the following command to create resnet18 for imagenet , but not sure the parameters are correct or not. Can you help me to check it: python app/imagenet/build_resnet.py -m bottleneck -b 2 2 2 2 -n 256 --no-fc_layers -o ./ Also I got an error to use the following command to generate ssd+resnet18. Do you know which parameters are incorrect? Thanks, |
Sounds good! You need to modify relu_stage1_block3 relu_stage2_block5 relu_stage3_block2 relu_stage4_block2 relu_stage5_block2 params to relu_stage1_block1 relu_stage2_block1 relu_stage3_block1 relu_stage4_block1 relu_stage5_block1 Also, extra_blocks could be 2 2 (or your choice, more blocks will increase runtime). Notice that resnet 18 has only 2 blocks in each stage (index starts with 0). Read more here |
Jay Shouldn't main_branch of resnet18 of imagenet be normal instead of The error is: F0814 01:05:54.747488 14253 eltwise_layer.cpp:34] Check failed: Thanks, On Sun, Aug 14, 2016 at 12:41 AM, Jay Mahadeokar notifications@github.com
|
Please specify -n as 64. Note that the bottleneck block has 3 layers 64,64,256 filters, whereas normal block has 2 layers with 64,64 filters. Since 1st conv layer has 64 filters, it gives error. I should do this check somewhere! FYI, resnet_18 has:
The flops is larger than resnet_50_1by2. Not sure if it will be faster, but I havent benchmarked. |
@kaishijeng, can you tell me how many times the speed of ssd+resnet50 is on the ssd+vgg16 using a GPU, TitanX. Thank you |
@kaishijeng , hi, I have test the Benchmarking by command line caffe time and found that the forward time of ssd+resnet50 is more than the forward time of ssd+vgg16. I do not how you see the speed improvement? |
MisayaZ,
time. On Wed, Nov 2, 2016 at 12:13 AM, MisayaZ notifications@github.com wrote:
|
SqeezeNet is not fast (compare to AlexNet), it just have small on disk size. |
@kaishijeng Hi kaishijeng, Have you successfully build the resnet18+SSD and get a good mAP? |
Jay
Do you have a plan to generate a builder for ssd+squeezenet?
I am looking for a low computational complexity of SSD detector and am thinking ssd+squeezenet may be a good compromise between accuracy and speed.
Thanks,
The text was updated successfully, but these errors were encountered: