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

Overview

SSPNet: Scale Selection Pyramid Network for Tiny Person Detection from UAV Images (IEEE GRSL 2021)

Code (based on mmdetection) for SSPNet: Scale Selection Pyramid Network for Tiny Person Detection from UAV Images. [PDF].

Illustrations of FPN (a) and our SSPNet (b), where the blue boxes indicate that the object that can not be matched at the current layer will be regarded as a negative sample, and the opposite is a positive sample. The SSM will filter the features flowing from deep layers to the next layer, where those objects that can be both matched at adjacent layers will be reserved, and others (i.e., background, objects that can not be both matched at adjacent layers) will be weakened.

Visualization of CAM

Qualitative results

How to use?

Config file

config/sspnet/faster_rcnn_r50_sspnet_1x_coco.py (Anchor-based).
config/sspnet/fovea_r50_sspnet_4x4_1x_coco.py (Anchor-free).

Scale Selection Pyramid Network

mmdet/models/necks/ssfpn.py

Weight Sampler

mmdet/core/bbox/samplers/ic_neg_sampler.py

How to get dataset?

You can download the TinyPerson Dataset in here. Our custom dataset is coming soon.

Note:

Sorry for being late!

TOD

  • release customized label
  • release pretrain model
  • add quantitative results

Citation

If you use this code or ideas from the paper for your research, please cite our paper:

@article{hong2021sspnet,
  title={SSPNet: Scale Selection Pyramid Network for Tiny Person Detection From UAV Images},
  author={Hong, Mingbo and Li, Shuiwang and Yang, Yuchao and Zhu, Feiyu and Zhao, Qijun and Lu, Li},
  journal={IEEE Geoscience and Remote Sensing Letters},
  year={2021},
  publisher={IEEE}
}

Reference

[1] Chen, Kai, et al. "MMDetection: Open mmlab detection toolbox and benchmark." arXiv preprint arXiv:1906.07155 (2019).

[2] Yu, Xuehui, et al. "Scale match for tiny person detection." Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision. 2020.

Contact

[email protected]

Comments
  • Which dataset is it?

    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?

    opened by guyuehuqaq 9
  • How to inference?

    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?

    opened by guofeng1996 3
  • About the performance of the pretrained model

    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!

    opened by haotianliu001 3
  • La loss

    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

    opened by shenxiangkei 2
  • Why the performance is not high as the reported one in the first tiny object detection challenge?

    Why the performance is not high as the reported one in the first tiny object detection challenge?

    @MingboHong Hello. I find you and your group did a brilliant job in the first tiny object detection challenge. I am wondering why the performance you got in that competition seems higher a lot than SSPNet.

    opened by freshn 1
  • Plz, help!

    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!!!!

    opened by caiyaya 1
  • error about ICBaseSampler

    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 :)

    opened by shaunyuan22 0
  • AttributeError: 'ConfigDict' object has no attribute 'log_level'

    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!

    opened by edu66 1
  • inference error

    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)

    opened by dagezhuang 0
  • The anno issues.

    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?

    opened by freshn 0
  • What's the exact image_prefix used?

    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.

    opened by freshn 2
Owner
Italian Cannon
Italian Cannon
PyTorch Implementation for AAAI'21 "Do Response Selection Models Really Know What's Next? Utterance Manipulation Strategies for Multi-turn Response Selection"

UMS for Multi-turn Response Selection Implements the model described in the following paper Do Response Selection Models Really Know What's Next? Utte

Taesun Whang 47 Nov 22, 2022
Implementation of "Selection via Proxy: Efficient Data Selection for Deep Learning" from ICLR 2020.

Selection via Proxy: Efficient Data Selection for Deep Learning This repository contains a refactored implementation of "Selection via Proxy: Efficien

Stanford Future Data Systems 70 Nov 16, 2022
XtremeDistil framework for distilling/compressing massive multilingual neural network models to tiny and efficient models for AI at scale

XtremeDistilTransformers for Distilling Massive Multilingual Neural Networks ACL 2020 Microsoft Research [Paper] [Video] Releasing [XtremeDistilTransf

Microsoft 125 Jan 4, 2023
A tiny, friendly, strong baseline code for Person-reID (based on pytorch).

Pytorch ReID Strong, Small, Friendly A tiny, friendly, strong baseline code for Person-reID (based on pytorch). Strong. It is consistent with the new

Zhedong Zheng 3.5k Jan 8, 2023
Aerial Imagery dataset for fire detection: classification and segmentation (Unmanned Aerial Vehicle (UAV))

Aerial Imagery dataset for fire detection: classification and segmentation using Unmanned Aerial Vehicle (UAV) Title FLAME (Fire Luminosity Airborne-b

null 79 Jan 6, 2023
Tiny Object Detection in Aerial Images.

AI-TOD AI-TOD is a dataset for tiny object detection in aerial images. [Paper] [Dataset] Description AI-TOD comes with 700,621 object instances for ei

jwwangchn 116 Dec 30, 2022
An image base contains 490 images for learning (400 cars and 90 boats), and another 21 images for testingAn image base contains 490 images for learning (400 cars and 90 boats), and another 21 images for testing

SVM Données Une base d’images contient 490 images pour l’apprentissage (400 voitures et 90 bateaux), et encore 21 images pour fait des tests. Prétrait

Achraf Rahouti 3 Nov 30, 2021
Pytorch implementation of Feature Pyramid Network (FPN) for Object Detection

fpn.pytorch Pytorch implementation of Feature Pyramid Network (FPN) for Object Detection Introduction This project inherits the property of our pytorc

Jianwei Yang 912 Dec 21, 2022
Pyramid Grafting Network for One-Stage High Resolution Saliency Detection. CVPR 2022

PGNet Pyramid Grafting Network for One-Stage High Resolution Saliency Detection. CVPR 2022, CVPR 2022 (arXiv 2204.05041) Abstract Recent salient objec

CVTEAM 109 Dec 5, 2022
[CVPR2021] UAV-Human: A Large Benchmark for Human Behavior Understanding with Unmanned Aerial Vehicles

UAV-Human Official repository for CVPR2021: UAV-Human: A Large Benchmark for Human Behavior Understanding with Unmanned Aerial Vehicle Paper arXiv Res

null 129 Jan 4, 2023
This is the official code for the paper "Tracker Meets Night: A Transformer Enhancer for UAV Tracking".

SCT This is the official code for the paper "Tracker Meets Night: A Transformer Enhancer for UAV Tracking" The spatial-channel Transformer (SCT) enhan

Intelligent Vision for Robotics in Complex Environment 27 Nov 23, 2022
This is the official code for the paper "Ad2Attack: Adaptive Adversarial Attack for Real-Time UAV Tracking".

Ad^2Attack:Adaptive Adversarial Attack on Real-Time UAV Tracking Demo video ?? Our video on bilibili demonstrates the test results of Ad^2Attack on se

Intelligent Vision for Robotics in Complex Environment 10 Nov 7, 2022
UAV-Networks-Routing is a Python simulator for experimenting routing algorithms and mac protocols on unmanned aerial vehicle networks.

UAV-Networks Simulator - Autonomous Networking - A.A. 20/21 UAV-Networks-Routing is a Python simulator for experimenting routing algorithms and mac pr

null 0 Nov 13, 2021
A Transformer-Based Feature Segmentation and Region Alignment Method For UAV-View Geo-Localization

University1652-Baseline [Paper] [Slide] [Explore Drone-view Data] [Explore Satellite-view Data] [Explore Street-view Data] [Video Sample] [中文介绍] This

Zhedong Zheng 335 Jan 6, 2023
Anti-UAV base on PaddleDetection

Paddle-Anti-UAV Anti-UAV base on PaddleDetection Background UAVs are very popular and we can see them in many public spaces, such as parks and playgro

Qingzhong Wang 2 Apr 20, 2022
Predicting Semantic Map Representations from Images with Pyramid Occupancy Networks

This is the code associated with the paper Predicting Semantic Map Representations from Images with Pyramid Occupancy Networks, published at CVPR 2020.

Thomas Roddick 219 Dec 20, 2022
M2MRF: Many-to-Many Reassembly of Features for Tiny Lesion Segmentation in Fundus Images

M2MRF: Many-to-Many Reassembly of Features for Tiny Lesion Segmentation in Fundus Images This repo is the official implementation of paper "M2MRF: Man

null 12 Dec 14, 2022
Code for "Contextual Non-Local Alignment over Full-Scale Representation for Text-Based Person Search"

Contextual Non-Local Alignment over Full-Scale Representation for Text-Based Person Search This is an implementation for our paper Contextual Non-Loca

Tencent YouTu Research 50 Dec 3, 2022
Large-Scale Pre-training for Person Re-identification with Noisy Labels (LUPerson-NL)

LUPerson-NL Large-Scale Pre-training for Person Re-identification with Noisy Labels (LUPerson-NL) The repository is for our CVPR2022 paper Large-Scale

null 43 Dec 26, 2022