Giter VIP home page Giter VIP logo

pytorch-faster-rcnn's Introduction

Hi there 👋

AlphaJia's github stats

  • 🔭 目前在创业公司做算法(计算机视觉,深度学习,机器学习)
  • 👯 三年图像算法行业经验
  • 🌱 四篇论文,三项专利
  • 🏃 喜欢打羽毛球
  • 🤔 个人网站:alpha-jia.com
  • 喜欢在 bilibili找新东西来学

⚡ Most Star Repo

pytorch-faster-rcnn keras_unet_plus_plus


🏆 Github Awards

AlphaJia

AlphaJia


✏️ Programming Languages

Top Langs

pytorch-faster-rcnn's People

Contributors

alphajia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pytorch-faster-rcnn's Issues

Please help me

when I run a command which Train with mobilenet, I got information like this:
Epoch: [0] [ 2950/19715] eta: 1:36:08.972184 loss_rpn_box_reg: 0.8739 (1.0911) lr: 0.005000 loss: 1.6920 (2.0218) loss_classifier: 0.3552 (0.4206) loss_box_reg: 0.1971 (0.2049) loss_objectness: 0.2848 (0.3052) time: 0.3408 data: 0.0152 max mem: 0

I want to know the number 19715 represent what and can you tell me how to reduce it's value, because I want to finish the train process as soon as possible.

i think anchor has error

in anchor generator

self.sizes = ((64,), (128,), (256,))
self.aspect_ratios = ((0.5,), (1,), (2.0,), (0.5,), (1,), (2.0,), (0.5,), (1,), (2.0,))

cell_anchors = [generate_anchors(sizes, aspect_ratios, dtype, device)
                        for sizes, aspect_ratios in zip(self.sizes, self.aspect_ratios)]

and cell_anchors result is

[tensor([[-45., -23.,  45.,  23.]], device='cuda:2'),
 tensor([[-64., -64.,  64.,  64.]], device='cuda:2'),
 tensor([[ -91., -181.,   91.,  181.]], device='cuda:2')]

anchors count should be 9 per pixel but only 3 base anchor..
i think because cell anchors made by zip(size, ratios), not product

The map is vey low

I have been running the model for a long time, but the map is always 0

Error using resnet50-fpn backbone

Hi
I am getting following error if i use resnet50-fpn backbone. mobilenet just works fine. Could you help me.

Traceback (most recent call last):
File "/Users/Mansoor/PycharmProjects/pythonProject/train.py", line 131, in
main()
File "/Users/Mansoor/PycharmProjects/pythonProject/train.py", line 83, in main
print_freq=50, warmup=False)
File "/Users/Mansoor/PycharmProjects/pythonProject/utils/train_utils.py", line 373, in train_one_epoch
loss_dict = model(images, targets)
File "/Users/Mansoor/opt/anaconda3/envs/pythonProject/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/Users/Mansoor/PycharmProjects/pythonProject/utils/faster_rcnn_utils.py", line 85, in forward
proposals, proposal_losses = self.rpn(images, features, targets)
File "/Users/Mansoor/opt/anaconda3/envs/pythonProject/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/Users/Mansoor/PycharmProjects/pythonProject/utils/rpn_utils.py", line 290, in forward
proposals = self.box_coder.decode(pred_bbox_deltas.detach(), anchors)
File "/Users/Mansoor/PycharmProjects/pythonProject/utils/det_utils.py", line 182, in decode
rel_codes.reshape(box_sum, -1), concat_boxes
RuntimeError: shape '[96768, -1]' is invalid for input of size 392832

please help me how to train my own data

i find that the COCODevkit dataset is too large for me, and i need to finish the training as soon as possible.
i tried to changed dataset i need to COCO format, and i changed the data_root_dir in my train_confi.py, however ,it can not work. i really wonder how to do so.
appreciate for any avaiable help

Question about the Result

I tried to use VOC dataset, so i have modified the dataloader and the evaluation code with some parts of mmedetction. However, i got really pool result (mAP is about 0.167) after 17 epochs training(about 1 day). So, i'm wondering how many epochs did your coco dataset cost, and what's your final AP result? I would be very grateful if you could give me the answer.

wrong out features on cls_logits

self.conv = nn.Conv2d(in_channels, in_channels, kernel_size=3, stride=1, padding=1)

'''background/foreground score'''
self.cls_logits = nn.Conv2d(in_channels, num_anchors, kernel_size=1, stride=1) #wrong

'''bbox regression parameters'''
self.bbox_pred = nn.Conv2d(in_channels, num_anchors * 4, kernel_size=1, stride=1)

###################
self.cls_logits = nn.Conv2d(in_channels, num_anchors * 2, kernel_size=1, stride=1) #correct

FPN101 error

is this model combination of ResNet101-FPN?
is so then why FPN codes are different than resnet50-fpn?

Please help me NameError : name "module" is not defined

image

Hi , i followed the instructions of README.md, prepared the packages and the dataset, and change some paramenters in train_config.py. All in done.
However,when i started to run train.py, errors saying that "module" is not defined. i don not change the code. I am really wonder how to solve the problem.
Thanks for any help!

rel_codes can not reshape bug

pred_boxes = self.decode_single(rel_codes.reshape(box_sum, -1), concat_boxes)
=>
rel_codes = rel_codes.view(box_sum, -1)
pred_boxes = self.decode_single(rel_codes, concat_boxes)

########################bug ###########################################
the rel_codes = rel_codes.view(box_sum, -1) #reshape fail on fpn resnet-50

########################correct######################################
rel_codes = rel_codes[:box_sum] #this will be correct

RuntimeError: shape '[516096, -1]' is invalid for input of size 2095104

I modified the data_root_dir in train_config.py and also placed the data as mentioned in the README.md
I face this error:

/home/dksingh/anaconda3/envs/mmdet220/lib/python3.7/site-packages/torch/nn/functional.py:3000: UserWarning: The default behavior for interpolate/upsample with float scale
_factor changed in 1.6.0 to align with other frameworks/libraries, and uses scale_factor directly, instead of relying on the computed output size. If you wish to keep the
 old behavior, please set recompute_scale_factor=True. See the documentation of nn.Upsample for details. 
  warnings.warn("The default behavior for interpolate/upsample with float scale_factor changed "
Traceback (most recent call last):
  File "train.py", line 132, in <module>
    main()
  File "train.py", line 84, in main
    print_freq=50, warmup=False)
  File "/home/dksingh/codes/clones/pytorch-faster-rcnn/utils/train_utils.py", line 373, in train_one_epoch
    loss_dict = model(images, targets)
  File "/home/dksingh/anaconda3/envs/mmdet220/lib/python3.7/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/dksingh/codes/clones/pytorch-faster-rcnn/utils/faster_rcnn_utils.py", line 85, in forward
    proposals, proposal_losses = self.rpn(images, features, targets)
  File "/home/dksingh/anaconda3/envs/mmdet220/lib/python3.7/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/dksingh/codes/clones/pytorch-faster-rcnn/utils/rpn_utils.py", line 290, in forward
    proposals = self.box_coder.decode(pred_bbox_deltas.detach(), anchors)
  File "/home/dksingh/codes/clones/pytorch-faster-rcnn/utils/det_utils.py", line 182, in decode
    rel_codes.reshape(box_sum, -1), concat_boxes
RuntimeError: shape '[516096, -1]' is invalid for input of size 2095104

add more backbone

Hi, thanks for your contribution, would you like to add more backbone like hrnet, some high resolution backbone network
Thanks

you got my star

just star it~~~thanks full py source in faster-rcnn, easier to learn

Model parameter error

Hi,

I downloaded your model fasterrcnn_resnet50_fpn_coco-258fb6c6.pth, but when i try to load this model using model.load_state_dict(checkpoint['model]), it shows "key error 'model'" so i try to print keys in model dictionaries and i didn't find 'model', Is it possible that you put the wrong model?

When I install

ERROR: Invalid requirement: u'torch~=1.5.1+cu101' (from line 1 of requirements.txt)
ERROR: Invalid requirement: u'torchvision~=0.6.1+cu101' (from line 5 of requirements.txt)
What should I do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.