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.

Cannot even make the demo work...help...

See original GitHub issue

I am pretty disappointed in myself. Appologies for my stupid question in advance. I am pretty new to all these detection stuff and pytorch thing.

I went through the way that you explained to run the demo. I guess i have everything set as you said. I have a data folder, inside of it i have two folders (pretrained_model and VOCdevkit2007). the VOCdevkit2007 is created via softlink. In the pretrained_model folder I have resnet101_caffe.pth and vgg16_caffe.pth.

I am trying to run the demo to run it on the images that you provided on the images folder. So I am going to run this command:

python demo.py --net vgg16 \ --checksession $SESSION --checkepoch $EPOCH --checkpoint $CHECKPOINT \ --cuda --load_dir path/to/model/directoy

and i run it like this:

python demo.py --net vgg16 \ --checksession 1 --checkepoch 6 --checkpoint 416 \ --cuda --load_dir /data/pretrained_model/vgg16_caffe.pth

am i doing anything wrong so far? This is what happened and it is not working:

Namespace(batch_size=1, cfg_file='cfgs/vgg16.yml', checkepoch=6, checkpoint=416, checksession=1, class_agnostic=False, cuda=True, dataset='pascal_voc', image_dir='images', load_dir='/data/pretrained_model/vgg16_caffe.pth', 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': '/home/alireza/Desktop/Code/VID/FRCNN2/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': '/home/alireza/Desktop/Code/VID/FRCNN2/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': True}
Traceback (most recent call last):
  File "demo.py", line 163, in <module>
    raise Exception('There is no input directory for loading network from ' + input_dir)
Exception: There is no input directory for loading network from /data/pretrained_model/vgg16_caffe.pth/vgg16/pascal_voc

Can anyone please help me … Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

9reactions
cbasavarajcommented, Jun 13, 2018

These models are pre-trained on ImageNet images for classification only. So you use them as the backbone for faster-rcnn which is an object detection architecture that can use many different underlying CNNs. Faster-RCNN itself has to be trained by you now for object detection.

1reaction
isalirezagcommented, Jun 13, 2018

@cbasavaraj Thank you for your help. I will try google cloud. but in the repository what they mean when they said:

Pretrained Model
We used two pretrained models in our experiments, VGG and ResNet101. You can download these two models from:
VGG16: Dropbox, VT Server
ResNet101: Dropbox, VT Server
Download them and put them into the data/pretrained_model/.

what are these pretrained model useful for?

Read more comments on GitHub >

github_iconTop Results From Across the Web

51 DIY Demolition Tips You Need to Know | Family Handyman
Not all demolition work is large in scale. A screwdriver can help with delicate demolition work, such as removing and fixing electrical ...
Read more >
Demo account - Analytics Help - Google Support
The Google Analytics demo account is a fully functional Google Analytics account that any Google user can access. It contains one Universal Analytics ......
Read more >
[Minecraft]can only play demo version - Microsoft Community
I really want to play this game, so I'm using the demo version. ** Even though I paid for it. I've been working...
Read more >
Working with demo content - Squarespace Help Center
To learn more, visit Adding pages to your navigation. To edit a demo page: Tap a supported page with a Demo label. Tap...
Read more >
Minecraft: Java Edition Demo Mode – Home
The demo mode is available to any Mojang or Microsoft account that is logged into ... If you still cannot log in, contact...
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