- 🔭 目前在创业公司做算法(计算机视觉,深度学习,机器学习)
- 👯 三年图像算法行业经验
- 🌱 四篇论文,三项专利
- 🏃 喜欢打羽毛球
- 🤔 个人网站:alpha-jia.com
- 喜欢在 bilibili找新东西来学
pytorch based implementation faster rcnn
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.
Pretrained weights with vgg16 and HRNet is not found, can you help?
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
How does faster rcnn calculate ap per class? Thank you very much!
I have been running the model for a long time, but the map is always 0
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
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
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.
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
is this model combination of ResNet101-FPN?
is so then why FPN codes are different than resnet50-fpn?
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!
How could I modify this repository for use on a CPU?
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
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
Hi,it is very great of you to do the contribution,but I want to run the code on the Nvidia 3090,how to modify the code?Thanks too much if you can help me.
Hi, thanks for your contribution, would you like to add more backbone like hrnet, some high resolution backbone network
Thanks
just star it~~~thanks full py source in faster-rcnn, easier to learn
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?
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.