jwyang / faster-rcnn.pytorch

A faster pytorch implementation of faster r-cnn
MIT License
7.7k stars 2.33k forks source link

Cant detect objects in images dir using vgg16 #450

Open ShreyVaghela opened 5 years ago

ShreyVaghela commented 5 years ago

Called with args: Namespace(batch_size=1, cfg_file='cfgs/vgg16.yml', checkepoch=2, checkpoint=5010, checksession=1, class_agnostic=False, cuda=False, dataset='pascal_voc', image_dir='images', load_dir='checkpoints', mGPUs=False, net='vgg16', parallel_type=0, set_cfgs=None, vis=False, webcam_num=-1) Using config: {'ANCHOR_RATIOS': [0.5, 1, 2], 'ANCHOR_SCALES': [8, 16, 32], 'CROP_RESIZE_WITH_MAX_POOL': False, 'CUDA': False, 'DATA_DIR': '/media/ursamajor/66832096-52e4-43eb-8028-36a8f03ba210/training_data/object_detection_pytorch/faster-rcnn.pytorch/data', 'DEDUP_BOXES': 0.0625, 'EPS': 1e-14, 'EXP_DIR': 'vgg16', 'FEAT_STRIDE': [16], 'GPU_ID': 0, 'MATLAB': 'matlab', 'MAX_NUM_GT_BOXES': 20, 'MOBILENET': {'DEPTH_MULTIPLIER': 1.0, 'FIXED_LAYERS': 5, 'REGU_DEPTH': False, 'WEIGHT_DECAY': 4e-05}, 'PIXEL_MEANS': array([[[102.9801, 115.9465, 122.7717]]]), 'POOLING_MODE': 'align', 'POOLING_SIZE': 7, 'RESNET': {'FIXED_BLOCKS': 1, 'MAX_POOL': False}, 'RNG_SEED': 3, 'ROOT_DIR': '/media/ursamajor/66832096-52e4-43eb-8028-36a8f03ba210/training_data/object_detection_pytorch/faster-rcnn.pytorch', 'TEST': {'BBOX_REG': True, 'HAS_RPN': True, 'MAX_SIZE': 1000, 'MODE': 'nms', 'NMS': 0.3, 'PROPOSAL_METHOD': 'gt', 'RPN_MIN_SIZE': 16, 'RPN_NMS_THRESH': 0.7, 'RPN_POST_NMS_TOP_N': 300, 'RPN_PRE_NMS_TOP_N': 6000, 'RPN_TOP_N': 5000, 'SCALES': [600], 'SVM': False}, 'TRAIN': {'ASPECT_GROUPING': False, 'BATCH_SIZE': 256, 'BBOX_INSIDE_WEIGHTS': [1.0, 1.0, 1.0, 1.0], 'BBOX_NORMALIZE_MEANS': [0.0, 0.0, 0.0, 0.0], 'BBOX_NORMALIZE_STDS': [0.1, 0.1, 0.2, 0.2], 'BBOX_NORMALIZE_TARGETS': True, 'BBOX_NORMALIZE_TARGETS_PRECOMPUTED': True, 'BBOX_REG': True, 'BBOX_THRESH': 0.5, 'BG_THRESH_HI': 0.5, 'BG_THRESH_LO': 0.0, 'BIAS_DECAY': False, 'BN_TRAIN': False, 'DISPLAY': 10, 'DOUBLE_BIAS': True, 'FG_FRACTION': 0.25, 'FG_THRESH': 0.5, 'GAMMA': 0.1, 'HAS_RPN': True, 'IMS_PER_BATCH': 1, 'LEARNING_RATE': 0.01, 'MAX_SIZE': 1000, 'MOMENTUM': 0.9, 'PROPOSAL_METHOD': 'gt', 'RPN_BATCHSIZE': 256, 'RPN_BBOX_INSIDE_WEIGHTS': [1.0, 1.0, 1.0, 1.0], 'RPN_CLOBBER_POSITIVES': False, 'RPN_FG_FRACTION': 0.5, 'RPN_MIN_SIZE': 8, 'RPN_NEGATIVE_OVERLAP': 0.3, 'RPN_NMS_THRESH': 0.7, 'RPN_POSITIVE_OVERLAP': 0.7, 'RPN_POSITIVE_WEIGHT': -1.0, 'RPN_POST_NMS_TOP_N': 2000, 'RPN_PRE_NMS_TOP_N': 12000, 'SCALES': [600], 'SNAPSHOT_ITERS': 5000, 'SNAPSHOT_KEPT': 3, 'SNAPSHOT_PREFIX': 'res101_faster_rcnn', 'STEPSIZE': [30000], 'SUMMARY_INTERVAL': 180, 'TRIM_HEIGHT': 600, 'TRIM_WIDTH': 600, 'TRUNCATED': False, 'USE_ALL_GT': True, 'USE_FLIPPED': True, 'USE_GT': False, 'WEIGHT_DECAY': 0.0005}, 'USE_GPU_NMS': False} load checkpoint checkpoints/vgg16/pascal_voc/faster_rcnn_1_2_5010.pth load model successfully! load checkpoint checkpoints/vgg16/pascal_voc/faster_rcnn_1_2_5010.pth Loaded Photo: 4 images.

Please help

ShreyVaghela commented 5 years ago

But training is being done successfully!!!

box 0.0444 [session 1][epoch 4][iter 654/5011] loss: 0.7293, lr: 3.50e-02 fg/bg=(42/470), time cost: 0.436015 rpn_cls: 0.5444, rpn_box: 0.3062, rcnn_cls: 0.4586, rcnn_box 0.1493 [session 1][epoch 4][iter 655/5011] loss: 0.5669, lr: 3.50e-02 fg/bg=(58/454), time cost: 0.450758 rpn_cls: 0.2681, rpn_box: 0.1243, rcnn_cls: 0.4807, rcnn_box 0.2606 [session 1][epoch 4][iter 656/5011] loss: 0.6825, lr: 3.50e-02 fg/bg=(59/453), time cost: 0.426265 rpn_cls: 0.3285, rpn_box: 0.0605, rcnn_cls: 0.6934, rcnn_box 0.2826 [session 1][epoch 4][iter 657/5011] loss: 0.6635, lr: 3.50e-02 fg/bg=(60/452), time cost: 0.415633 rpn_cls: 0.4313, rpn_box: 0.0466, rcnn_cls: 0.5925, rcnn_box 0.2567 [session 1][epoch 4][iter 658/5011] loss: 0.6021, lr: 3.50e-02 fg/bg=(48/464), time cost: 0.395554 rpn_cls: 0.3763, rpn_box: 0.1424, rcnn_cls: 0 . . . . .

ShreyVaghela commented 5 years ago

Note: I trained it for 2-3 epochs to see if everything works!!!

lucasjinreal commented 5 years ago

@ShreyVaghela Same issue here, did you find the reason for this? (I can detect things but the positin totally wrong)

ShreyVaghela commented 5 years ago

Dear sir,

I did not looked into further and transfered from pytorch to TF object detection api as I needed more architectures to play around with my data. But I think the problem with mine was I only trained it for 3-4 epochs and may be I should have trained it more in order to get the proper output. If you trained it for less epochs try to increase the number of epochs.

Regards, Shrey

On Sat, 9 Mar 2019, 9:17 a.m. JinTian, notifications@github.com wrote:

@ShreyVaghela https://github.com/ShreyVaghela Same issue here, did you find the reason for this? (I can detect things but the positin totally wrong)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jwyang/faster-rcnn.pytorch/issues/450#issuecomment-471142424, or mute the thread https://github.com/notifications/unsubscribe-auth/ATH56-CB99V86gFNA-3kExVakE4LEEjRks5vUy7TgaJpZM4bFIJS .

lucasjinreal commented 5 years ago

@ShreyVaghela I tested 20 epochs, position still wrong, and I can not download trained model from dropbox in China. Can you access a vgg model in dropbox? Would u like transfor it into google drive?

Fingerl commented 5 years ago

hello,can you tell me where i can get the pretrained model about VGG? the link sames invalid,thanks

ShreyVaghela commented 5 years ago

Hello sir, For certain reason currently I am not working with this pipeline but I will work with it in initial weeks of April. I will surely get back to you if I detect objects.

Sorry for not being helpful for now.

On Thu, 21 Mar 2019, 9:48 a.m. Fingerl, notifications@github.com wrote:

hello,can you tell me where i can get the pretrained model about VGG? the link sames invalid,thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jwyang/faster-rcnn.pytorch/issues/450#issuecomment-475109038, or mute the thread https://github.com/notifications/unsubscribe-auth/ATH5618MOevrdw6fnLZSiuZYQRbWYLfsks5vYwgggaJpZM4bFIJS .

Coderhancode commented 4 years ago

Hello,have you found the reasons of this problem? @ShreyVaghela @jinfagang

ShreyVaghela commented 4 years ago

Hi, Unfortunately no, as I shifted to pytorch for development.

On Wed, Apr 1, 2020, 8:56 AM lotusboy notifications@github.com wrote:

Hello,were you find the reasons of this problem? @ShreyVaghela https://github.com/ShreyVaghela @jinfagang https://github.com/jinfagang

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jwyang/faster-rcnn.pytorch/issues/450#issuecomment-607205179, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEY7T26DDGG36COUN6ZIEO3RKMTVJANCNFSM4GYUQJJA .

devendraswamy commented 4 years ago

I faced the same problem with res101 model , please help me