GithubHelp home page GithubHelp logo

mingbohong / sspnet Goto Github PK

View Code? Open in Web Editor NEW
56.0 56.0 18.0 14.56 MB

SSPNet: Scale Selection Pyramid Network for Tiny Person Detection from UAV Images.

Python 99.96% Shell 0.04%
computer-vision object-detection

sspnet's People

Contributors

callmefrozenbanana avatar mingbohong 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

Watchers

 avatar  avatar

sspnet's Issues

Which dataset is it?

Hello, I use the erase_with_uncertain_dataset dataset in Tiny Person and the test results in your paper are different, which part of the dataset are you using?

bugs:out of bounds

mmdet/models/module/heatmap.py line 94

threshold = -bg_score_sorted[bg_num - 1]

The anno issues.

It seems in extra annotations, all objects including those with 'uncertain', 'ignore' and 'is_dense' are used for training. Would you mind sharing the annotation file which use only normal objects as asked in the TOD challenge?

AttributeError: 'ConfigDict' object has no attribute 'log_level'

Hello everyone! I have the mistake
File "tools/train.py", line 189, in
main()
File "tools/train.py", line 133, in main
logger = get_root_logger(log_file=log_file, log_level=cfg.log_level)
File "/opt/conda/envs/ssp/lib/python3.7/site-packages/mmcv/utils/config.py", line 507, in getattr
return getattr(self._cfg_dict, name)
File "/opt/conda/envs/ssp/lib/python3.7/site-packages/mmcv/utils/config.py", line 48, in getattr
raise ex
AttributeError: 'ConfigDict' object has no attribute 'log_level'
please help me!

About the performance of the pretrained model

I download the pretrained weights of "faster_rcnn_r50_sspnet" and get the following results:

 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=200 ] = 0.6227
 Average Precision  (AP) @[ IoU=0.50      | area=  tiny | maxDets=200 ] = 0.5835
 Average Precision  (AP) @[ IoU=0.50      | area= tiny1 | maxDets=200 ] = 0.4437
 Average Precision  (AP) @[ IoU=0.50      | area= tiny2 | maxDets=200 ] = 0.6191
 Average Precision  (AP) @[ IoU=0.50      | area= tiny3 | maxDets=200 ] = 0.6693
 Average Precision  (AP) @[ IoU=0.50      | area= small | maxDets=200 ] = 0.7189
 Average Precision  (AP) @[ IoU=0.50      | area=reasonable | maxDets=200 ] = 0.7330

I also try to change the maxDets to 1000 and the results is:

 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=1000 ] = 0.6251
 Average Precision  (AP) @[ IoU=0.50      | area=  tiny | maxDets=1000 ] = 0.5858
 Average Precision  (AP) @[ IoU=0.50      | area= tiny1 | maxDets=1000 ] = 0.4492
 Average Precision  (AP) @[ IoU=0.50      | area= tiny2 | maxDets=1000 ] = 0.6222
 Average Precision  (AP) @[ IoU=0.50      | area= tiny3 | maxDets=1000 ] = 0.6719
 Average Precision  (AP) @[ IoU=0.50      | area= small | maxDets=1000 ] = 0.7188
 Average Precision  (AP) @[ IoU=0.50      | area=reasonable | maxDets=1000 ] = 0.7331

My test command is:

tools/dist_test.sh configs/sspnet/faster_rcnn_r50_sspnet_1x_coco.py epoch_10.pth 2 --eval bbox 

So, how can I get the performance AP50 60.87 in README.md? Does the AP50 stand for AP50_tiny? Thanks!

What's the exact image_prefix used?

@MingboHong Hello. What is the image_prefix used for training? There is no folder named 'images' that is used in configs/base/coco_detection.py. When I use 'tiny_set/train/', the iod_overlaps used in the sampler is void sometimes.

error about ICBaseSampler

Thanks for your codes!
I met a problem when used SSPNet to train my own dataset, specifically, it will trigger a TypeError as follow:
image
And i check the code, in line 112 of ic_base_sampler.py, the following codes are the reason:

sampling_result = SamplingResult(pos_inds, neg_inds, bboxes, gt_bboxes, assign_result, gt_flags, iod_max_overlaps+conf)
in which the class SamplingResult can only be initiated with seven arguments (including self), hence the iod_max_overlaps+conf will cause the error. And when I remove the last parameter, it stills trigger another error as follow:
image
this makes me confused. Look forward to hearing from you, thanks a lot :)

inference error

The faster_rcnn_r50_sspnet_1x_coco can be trained correctly, but when I inference the trained model then encountered the error below.

inference_detector(model, imagepath)

python inference_img.py
/home/ubuntu/mmdetection-2.19.0/mmdet/models/builder.py:53: UserWarning: train_cfg and test_cfg is deprecated, please specify them in model
'please specify them in model', UserWarning)
load checkpoint from local path: /home/ubuntu/fovea/sspnet/epoch_1.pth
/home/ubuntu/mmdetection-2.19.0/mmdet/datasets/utils.py:69: UserWarning: "ImageToTensor" pipeline is replaced by "DefaultFormatBundle" for batch inference. It is recommended to manually replace it in the test data pipeline in your config file.
'data pipeline in your config file.', UserWarning)
/home/ubuntu/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /pytorch/c10/core/TensorImpl.h:1156.)
return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
Traceback (most recent call last):
File "inference_img.py", line 26, in
result = inference_detector(model, imagepath)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/apis/inference.py", line 147, in inference_detector
results = model(return_loss=False, rescale=True, **data)
File "/home/ubuntu/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ubuntu/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 109, in new_func
return old_func(*args, **kwargs)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/models/detectors/base.py", line 174, in forward
return self.forward_test(img, img_metas, **kwargs)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/models/detectors/base.py", line 147, in forward_test
return self.simple_test(imgs[0], img_metas[0], **kwargs)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/models/detectors/faster_rcnn_ssp.py", line 186, in simple_test
x = self.extract_feat(img)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/models/detectors/faster_rcnn_ssp.py", line 70, in extract_feat
x, att = self.neck(x)
ValueError: too many values to unpack (expected 2)

How to inference?

My inference command is :python demo/image_demo.py 2.jpg configs/sspnet/faster_rcnn_r50_sspnet_1x_coco_new.py checkpoints/epoch_10.pth --device cuda:3

Traceback (most recent call last):
File "demo/image_demo.py", line 50, in
main(args)
File "demo/image_demo.py", line 30, in main
result = inference_detector(model, args.img)
File "/home/SSPNet-master/mmdet/apis/inference.py", line 129, in inference_detector
data = test_pipeline(data)
File "/home/SSPNet-master/mmdet/datasets/pipelines/compose.py", line 41, in call
data = t(data)
File "/home/SSPNet-master/mmdet/datasets/pipelines/loading.py", line 61, in call
corner = results['img_info']['corner']
KeyError: 'corner

How can I fix it? or How to inference a image?

La loss "WNS"

Thank you very much for sharing your code. I want to ask a few questions. Which part of the code does "WNS" reflect? Where is La's loss? thanks

Plz, help!

Hi, Could you give me some help? PLZ!!
Tiny_person dataset seems not be straight used in your project.
Could you please afford custom dataset? PlZ
Your help is important for me!!!!

how to train

i don not find a file named train,or relevant file

out of bounds

mmdet/models/module/heatmap.py line81
threshold = -bg_score_sorted[bg_num - 1]

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.