Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Pvanet:Deep but Lightweight Neural Neural Networks for Real-time Object Detection #7786

Closed
wants to merge 15 commits into from

Conversation

qingzhouzhen
Copy link
Contributor

@qingzhouzhen qingzhouzhen commented Sep 7, 2017

article adress : Pvanet:Deep but Lightweight Neural Neural Networks for Real-time Object Detection
Result of classification network:
INFO:root:Epoch[82] Batch [2000] Speed: 586.96 samples/sec accuracy=0.668164 top_k_accuracy_5=0.874805 INFO:root:Epoch[82] Batch [2050] Speed: 586.14 samples/sec accuracy=0.664766 top_k_accuracy_5=0.876250 INFO:root:Epoch[82] Batch [2100] Speed: 589.28 samples/sec accuracy=0.668438 top_k_accuracy_5=0.870938 INFO:root:Epoch[82] Batch [2150] Speed: 587.12 samples/sec accuracy=0.669766 top_k_accuracy_5=0.877266 INFO:root:Epoch[82] Batch [2200] Speed: 590.23 samples/sec accuracy=0.664297 top_k_accuracy_5=0.874922 INFO:root:Epoch[82] Batch [2250] Speed: 584.57 samples/sec accuracy=0.672266 top_k_accuracy_5=0.876836 INFO:root:Epoch[82] Batch [2300] Speed: 590.03 samples/sec accuracy=0.674492 top_k_accuracy_5=0.876172 INFO:root:Epoch[82] Batch [2350] Speed: 588.57 samples/sec accuracy=0.670820 top_k_accuracy_5=0.874453 INFO:root:Epoch[82] Batch [2400] Speed: 587.81 samples/sec accuracy=0.673672 top_k_accuracy_5=0.876094 INFO:root:Epoch[82] Batch [2450] Speed: 591.53 samples/sec accuracy=0.671406 top_k_accuracy_5=0.873828 INFO:root:Epoch[82] Batch [2500] Speed: 582.21 samples/sec accuracy=0.671992 top_k_accuracy_5=0.874805 INFO:root:Epoch[82] Train-accuracy=0.663086 INFO:root:Epoch[82] Train-top_k_accuracy_5=0.849609 INFO:root:Epoch[82] Time cost=2180.302 INFO:root:Saved checkpoint to "pvanet-models/pvanet-0083.params" INFO:root:Epoch[82] Validation-accuracy=0.640804 INFO:root:Epoch[82] Validation-top_k_accuracy_5=0.854931

Result of rpn and faster-rcnn training:
INFO:root:Epoch[9] Batch [9940] Speed: 2.57 samples/sec RPNAcc=0.991533 RPNLogLoss=0.023411 RPNL1Loss=0.322666 RCNNAcc=0.943286 RCNNLogLoss=0.157866RCNNL1Loss=0.834379 INFO:root:Epoch[9] Batch [9960] Speed: 2.66 samples/sec RPNAcc=0.991529 RPNLogLoss=0.023437 RPNL1Loss=0.322645 RCNNAcc=0.943291 RCNNLogLoss=0.157865RCNNL1Loss=0.834185 INFO:root:Epoch[9] Batch [9980] Speed: 2.48 samples/sec RPNAcc=0.991519 RPNLogLoss=0.023454 RPNL1Loss=0.322520 RCNNAcc=0.943320 RCNNLogLoss=0.157764RCNNL1Loss=0.833864 INFO:root:Epoch[9] Batch [10000] Speed: 2.63 samples/sec RPNAcc=0.991529 RPNLogLoss=0.023437 RPNL1Loss=0.322378 RCNNAcc=0.943317 RCNNLogLoss=0.157765 RCNNL1Loss=0.833716 INFO:root:Epoch[9] Batch [10020] Speed: 2.49 samples/sec RPNAcc=0.991519 RPNLogLoss=0.023461 RPNL1Loss=0.322260 RCNNAcc=0.943335 RCNNLogLoss=0.157711 RCNNL1Loss=0.833482 INFO:root:Epoch[9] Train-RPNAcc=0.991520 INFO:root:Epoch[9] Train-RPNLogLoss=0.023459 INFO:root:Epoch[9] Train-RPNL1Loss=0.322241 INFO:root:Epoch[9] Train-RCNNAcc=0.943339 INFO:root:Epoch[9] Train-RCNNLogLoss=0.157700 INFO:root:Epoch[9] Train-RCNNL1Loss=0.833458 INFO:root:Epoch[9] Time cost=3940.801 INFO:root:Saved checkpoint to "model/e2e-0010.params"

Result of the whole Object Detection network:
INFO:root:reading annotations for 4301/4952
INFO:root:reading annotations for 4401/4952
INFO:root:reading annotations for 4501/4952
INFO:root:reading annotations for 4601/4952
INFO:root:reading annotations for 4701/4952
INFO:root:reading annotations for 4801/4952
INFO:root:reading annotations for 4901/4952
INFO:root:saving annotations cache to data/cache/voc_2007_test_annotations.pkl
INFO:root:AP for aeroplane = 0.5641
INFO:root:AP for bicycle = 0.6811
INFO:root:AP for bird = 0.5965
INFO:root:AP for boat = 0.4123
INFO:root:AP for bottle = 0.3641
INFO:root:AP for bus = 0.7021
INFO:root:AP for car = 0.7254
INFO:root:AP for cat = 0.7801
INFO:root:AP for chair = 0.3233
INFO:root:AP for cow = 0.5812
INFO:root:AP for diningtable = 0.5688
INFO:root:AP for dog = 0.7511
INFO:root:AP for horse = 0.7783
INFO:root:AP for motorbike = 0.6953
INFO:root:AP for person = 0.6612
INFO:root:AP for pottedplant = 0.2878
INFO:root:AP for sheep = 0.5344
INFO:root:AP for sofa = 0.5900
INFO:root:AP for train = 0.6550
INFO:root:AP for tvmonitor = 0.6214
INFO:root:Mean AP = 0.5937

Mark:
1 Currently, the classification network result is 64%(70.6% as article), result of object detection is poor than article's, I will improve it in the days ahead
2 There has no 4 contributors as show, actually, it is just me , but I used different computers and proxy, next time I will pay attention to it

import mxnet as mx
def get_symbol(num_classes, **kwargs):

data = mx.sym.Variable(name='data')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why put the same file at two places?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pvanet is a classification net, it is a little different with it's counterpart as in symbol_pvanet, And secondly, I cannot upload pre-trained model(pvanet.py) for it is too large, thus some one else could pretrain with pvanet.py on ImageNet

@qingzhouzhen
Copy link
Contributor Author

How I do:
1 pretrain pvanet with ImageNet, it is image classification, to specify, cd /path/to/example/image-calssification python train_imagenet.py --data-train=/data/ILSVRC2012_img_train.rec --data-val=/data/ILSVRC2012_img_val.rec --model-prefix=pvanet-models/pvanet --network=pvanet --gpus=0,1,2,3 --disp-batch=50 --batch-size=512 --lr=0.1 --top-k=5 , as refered in article, reshape image to 192*192
2 when "1" step finished, copy the model to /path/to/incubator-mxnet/example/rcnn/model, then bash script/pvanet_voc07.sh 0

@chinakook
Copy link
Contributor

A nice feature!

@piiswrong
Copy link
Contributor

Could you add pvanet to here: https://mxnet.incubator.apache.org/model_zoo/index.html
and explain how to use it in rcnn's readme?

@mli Can we give @qingzhouzhen access to the modelzoo hosting server?

@qingzhouzhen
Copy link
Contributor Author

qingzhouzhen commented Sep 8, 2017

OK, I'd like to, but I did not find where to push code in this link https://mxnet.incubator.apache.org/model_zoo/index.html @piiswrong

@piiswrong
Copy link
Contributor

@winstywang Anyone from your side can review this?

@piiswrong
Copy link
Contributor

@qingzhouzhen We decided to postpone merge and pretrained model upload until the result is reasonably close to the original paper.

@qingzhouzhen
Copy link
Contributor Author

Ok, I will work on this to improve the result, if have any suggestion to my problem(mAP is low), please inform me, I am new to deep learning and mxnet @piiswrong

@qingzhouzhen
Copy link
Contributor Author

I think the first part(image classfication net) is OK, currently the accuracy is 64.08%(70.6% as the result of the article), Can I push the first part only? @piiswrong

@szha
Copy link
Member

szha commented Sep 11, 2017

6% is a bit far...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants