[Pedestron] Generalizable Pedestrian Detection: The Elephant In The Room. @ CVPR2021

Overview

PWC

PWC

Pedestron

Pedestron is a MMdetection based repository, that focuses on the advancement of research on pedestrian detection. We provide a list of detectors, both general purpose and pedestrian specific to train and test. Moreover, we provide pre-trained models and benchmarking of several detectors on different pedestrian detection datasets. Additionally, we provide processed annotations and scripts to process the annotation of different pedestrian detection benchmarks. If you use Pedestron, please cite us (see at the end) and other respective sources.

🔥 Updates 🔥

YouTube demo

Leaderboards

Installation

We refer to the installation and list of dependencies to installation file. Clone this repo and follow installation. Alternatively, Google Colab step-by-step instruction can be followed for installation (Please download the pre-trained models from the table in the readme.md, the link is broken on google colab for the pre-trained model). Addiitonally, you can also refer to the google doc file for step-by-step installation. For running a docker image please see installation file.

List of detectors

Currently we provide configurations for the following detectors, with different backbones

  • Cascade Mask-R-CNN
  • Faster R-CNN
  • RetinaNet
  • RetinaNet with Guided Anchoring
  • Hybrid Task Cascade (HTC)
  • MGAN
  • CSP

Following datasets are currently supported

Datasets Preparation

Benchmarking

Benchmarking of pre-trained models on pedestrian detection datasets (autonomous driving)

Detector Dataset Backbone Reasonable Heavy
Cascade Mask R-CNN CityPersons HRNet 7.5 28.0
Cascade Mask R-CNN CityPersons MobileNet 10.2 37.3
Faster R-CNN CityPersons HRNet 10.2 36.2
RetinaNet CityPersons ResNeXt 14.6 39.5
RetinaNet with Guided Anchoring CityPersons ResNeXt 11.7 41.5
Hybrid Task Cascade (HTC) CityPersons ResNeXt 9.5 35.8
MGAN CityPersons VGG 11.2 52.5
CSP CityPersons ResNet-50 10.9 41.3
Cascade Mask R-CNN Caltech HRNet 1.7 25.7
Cascade Mask R-CNN EuroCity Persons HRNet 4.4 21.3
Faster R-CNN EuroCity Persons HRNet 6.1 27.0

Benchmarking of pre-trained models on general human/person detection datasets

Detector Dataset Backbone AP
Cascade Mask R-CNN CrowdHuman HRNet 84.1

Getting Started

Running a demo using pre-trained model on few images

Pre-trained model can be evaluated on sample images in the following way

python tools/demo.py config checkpoint input_dir output_dir

Download one of our provided pre-trained model and place it in models_pretrained folder. Demo can be run using the following command

python tools/demo.py configs/elephant/cityperson/cascade_hrnet.py ./models_pretrained/epoch_5.pth.stu demo/ result_demo/ 

See Google Colab demo.

Training

  • single GPU training
  • multiple GPU training

Train with single GPU

python tools/train.py ${CONFIG_FILE}

Train with multiple GPUs

./tools/dist_train.sh ${CONFIG_FILE} ${GPU_NUM} [optional arguments]

For instance training on CityPersons using single GPU

python tools/train.py configs/elephant/cityperson/cascade_hrnet.py

Training on CityPersons using multiple(7 in this case) GPUs

./tools/dist_train.sh configs/elephant/cityperson/cascade_hrnet.py 7  

Testing

  • single GPU testing
  • multiple GPU testing

Test can be run using the following command.

python ./tools/TEST_SCRIPT_TO_RUN.py PATH_TO_CONFIG_FILE ./models_pretrained/epoch_ start end\
 --out Output_filename --mean_teacher 

For example for CityPersons inference can be done the following way

  1. Download the pretrained CityPersons model and place it in the folder "models_pretrained/".
  2. Run the following command:
python ./tools/test_city_person.py configs/elephant/cityperson/cascade_hrnet.py ./models_pretrained/epoch_ 5 6\
 --out result_citypersons.json --mean_teacher 

Alternatively, for EuroCity Persons

python ./tools/test_euroCity.py configs/elephant/eurocity/cascade_hrnet.py ./models_pretrained/epoch_ 147 148 --mean_teacher

or without mean_teacher flag for MGAN

python ./tools/test_city_person.py configs/elephant/cityperson/mgan_vgg.py ./models_pretrained/epoch_ 1 2\
 --out result_citypersons.json  

Testing with multiple GPUs on CrowdHuman

./tools/dist_test.sh ${CONFIG_FILE} ${CHECKPOINT_FILE} ${GPU_NUM} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}]
./tools/dist_test.sh configs/elephant/crowdhuman/cascade_hrnet.py ./models_pretrained/epoch_19.pth.stu 8 --out CrowdHuman12.pkl --eval bbox

Please cite the following work

CVPR2021

@InProceedings{Hasan_2021_CVPR,
    author    = {Hasan, Irtiza and Liao, Shengcai and Li, Jinpeng and Akram, Saad Ullah and Shao, Ling},
    title     = {Generalizable Pedestrian Detection: The Elephant in the Room},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2021},
    pages     = {11328-11337}
}
Comments
  • When  i tried to trian cascade_hrnet network, but i got an error.

    When i tried to trian cascade_hrnet network, but i got an error.

    *rpn_loss_inputs, gt_bboxes_ignore=gt_bboxes_ignore)
    

    File "/media/xx/xx/Pedestron/mmdet/models/anchor_heads/rpn_head.py", line 51, in loss gt_bboxes_ignore=gt_bboxes_ignore) File "/media/xx/xx/Pedestron/mmdet/core/fp16/decorators.py", line 127, in new_func return old_func(*args, **kwargs) File "/media/xx/xx/Pedestron/mmdet/models/anchor_heads/anchor_head.py", line 179, in loss sampling=self.sampling) File "/media/xx/xx/Pedestron/mmdet/core/anchor/anchor_target.py", line 63, in anchor_target unmap_outputs=unmap_outputs) File "/media/xx/xx/Pedestron/mmdet/core/utils/misc.py", line 24, in multi_apply return tuple(map(list, zip(*map_results))) File "/media/xx/xx/Pedestron/mmdet/core/anchor/anchor_target.py", line 108, in anchor_target_single cfg.allowed_border) File "/media/xx/xx/Pedestron/mmdet/core/anchor/anchor_target.py", line 176, in anchor_inside_flags (flat_anchors[:, 2] < img_w + allowed_border) &
    RuntimeError: Expected object of scalar type Byte but got scalar type Bool for argument #2 'other'

    good first issue 
    opened by muzishen 23
  • ImportError: cannot import name 'get_dist_info' from 'mmcv.runner.utils'

    ImportError: cannot import name 'get_dist_info' from 'mmcv.runner.utils'

    When I run this command: python tools/demo.py configs/elephant/cityperson/cascade_hrnet.py ./models_pretrained/epoch_5.pth.stu demo/ result_demo/

    I am getting this error: ImportError: cannot import name 'get_dist_info' from 'mmcv.runner.utils'

    I have installed mmdetection as per your instructions and also tried for conda-instruction.

    I updated mmcv as per the suggestions got online but nothing is working. Now my mmcv version is 0.4.4

    opened by Varat7v2 13
  • RuntimeError: CUDA error: no kernel image is available for execution on the device

    RuntimeError: CUDA error: no kernel image is available for execution on the device

    I run this command (same as example): $ python3 tools/demo.py configs/elephant/cityperson/cascade_hrnet.py ./models_pretrained/epoch_5.pth.stu ../data/person/ result_demo/ ../data/person/

    get me this error:

    ['../data/person/p3.jpg', '../data/person/p8.jpg', '../data/person/p4.jpg', '../data/person/p2.jpg', '../data/person/p1.jpg', '../data/person/p10.jpg', '../data/person/p7.jpg', '../data/person/p6.jpg', '../data/person/p9.jpg', '../data/person/p5.jpg', '../data/person/p11.jpg']
    unexpected key in source state_dict: mask_head.0.conv_res.conv.weight, mask_head.0.conv_res.conv.bias, mask_head.1.conv_res.conv.weight, mask_head.1.conv_res.conv.bias, mask_head.2.conv_res.conv.weight, mask_head.2.conv_res.conv.bias
    
    ./Pedestron-master/tools/../mmdet/apis/inference.py:39: UserWarning: Class names are not saved in the checkpoint's meta data, use COCO classes by default.
      warnings.warn('Class names are not saved in the checkpoint\'s '
    [                                                  ] 0/11, elapsed: 0s, ETA:Traceback (most recent call last):
      File "tools/demo.py", line 67, in <module>
        run_detector_on_dataset()
      File "tools/demo.py", line 63, in run_detector_on_dataset
        detections = mock_detector(model, im, output_dir)
      File "tools/demo.py", line 37, in mock_detector
        results = inference_detector(model, image)
      File "./Pedestron-master/tools/../mmdet/apis/inference.py", line 66, in inference_detector
        return _inference_single(model, imgs, img_transform, device)
      File "./Pedestron-master/tools/../mmdet/apis/inference.py", line 93, in _inference_single
        result = model(return_loss=False, rescale=True, **data)
      File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 532, in __call__
        result = self.forward(*input, **kwargs)
      File "./Pedestron-master/tools/../mmdet/core/fp16/decorators.py", line 49, in new_func
        return old_func(*args, **kwargs)
      File "./Pedestron-master/tools/../mmdet/models/detectors/base.py", line 88, in forward
        return self.forward_test(img, img_meta, **kwargs)
      File "./Pedestron-master/tools/../mmdet/models/detectors/base.py", line 79, in forward_test
        return self.simple_test(imgs[0], img_metas[0], **kwargs)
      File "./Pedestron-master/tools/../mmdet/models/detectors/cascade_rcnn.py", line 241, in simple_test
        x = self.extract_feat(img)
      File "./Pedestron-master/tools/../mmdet/models/detectors/cascade_rcnn.py", line 115, in extract_feat
        x = self.backbone(img)
      File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 532, in __call__
        result = self.forward(*input, **kwargs)
      File "./Pedestron-master/tools/../mmdet/models/backbones/hrnet.py", line 446, in forward
        x = self.relu(x)
      File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 532, in __call__
        result = self.forward(*input, **kwargs)
      File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/activation.py", line 94, in forward
        return F.relu(input, inplace=self.inplace)
      File "/usr/local/lib/python3.5/dist-packages/torch/nn/functional.py", line 912, in relu
        result = torch.relu_(input)
    RuntimeError: CUDA error: no kernel image is available for execution on the device
    

    my python version is 3.5

    opened by Morteza-j8 12
  • retinanet accuracy

    retinanet accuracy

    Hi @hasanirtiza , In your pretrained model of Retinanet, the cityperson accuracy is not that good, did you use crowdHuman and widerpedestrian dataset to pre-trained it?

    Thanks Meixitu

    enhancement 
    opened by meixitu 11
  • Links to download pretrained model are not working.

    Links to download pretrained model are not working.

    I have tried to download pretrained models to run demo of Pedestron. But links are not working, Could you please check? Also, Could you please check this issue https://github.com/hasanirtiza/Pedestron/issues/96#issuecomment-835696376? Thanks.

    opened by SamihaSara 8
  • Testing problem

    Testing problem

    I am facing the following error when I eval the pre-trained model on CityPersons dataset.

      File "./tools/test_city_person.py", line 230, in <module>
        main()
      File "./tools/test_city_person.py", line 222, in main
        MRs = validate('datasets/CityPersons/val_gt.json', args.out)
      File "/home/mingzhi/Downloads/Pedestron/tools/cityPerson/eval_demo.py", line 13, in validate
        cocoEval = COCOeval(cocoGt, cocoDt, 'bbox')
      File "/home/mingzhi/Downloads/Pedestron/tools/cityPerson/eval_MR_multisetup.py", line 76, in __init__
        self.params = Params(iouType=iouType) # parameters
      File "/home/mingzhi/Downloads/Pedestron/tools/cityPerson/eval_MR_multisetup.py", line 525, in __init__
        self.setDetParams()
      File "/home/mingzhi/Downloads/Pedestron/tools/cityPerson/eval_MR_multisetup.py", line 501, in setDetParams
        self.recThrs = np.linspace(.0, 1.00, np.round((1.00 - .0) / .01) + 1, endpoint=True)
      File "<__array_function__ internals>", line 6, in linspace
      File "/home/mingzhi/anaconda3/envs/pedestron/lib/python3.7/site-packages/numpy/core/function_base.py", line 113, in linspace
        num = operator.index(num)
    TypeError: 'numpy.float64' object cannot be interpreted as an integer
    

    When I train the model and eval my own trained models, I am having this problem: File "./tools/test_city_person.py", line 230, in <module> main() File "./tools/test_city_person.py", line 222, in main MRs = validate('datasets/CityPersons/val_gt.json', args.out) File "/home/mingzhi/Downloads/Pedestron/tools/cityPerson/eval_demo.py", line 11, in validate cocoDt = cocoGt.loadRes(dt_path) File "/home/mingzhi/Downloads/Pedestron/tools/cityPerson/coco.py", line 313, in loadRes if 'caption' in anns[0]: IndexError: list index out of range

    How can I solve the above two problems?? I know for the second one, it seems the model does not detect, but why?

    opened by msha096 8
  • Inference on Colab - Setup issue

    Inference on Colab - Setup issue

    I tried to setup and run inference on a custom dataset from Google Colab. But, I am not able to run the setup and I get this error. Can you please help resolve this?

    `running develop running egg_info writing mmdet.egg-info/PKG-INFO writing dependency_links to mmdet.egg-info/dependency_links.txt writing requirements to mmdet.egg-info/requires.txt writing top-level names to mmdet.egg-info/top_level.txt /usr/local/lib/python3.6/dist-packages/torch/utils/cpp_extension.py:304: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) writing manifest file 'mmdet.egg-info/SOURCES.txt' running build_ext building 'mmdet.ops.roi_align.roi_align_cuda' extension x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.6/dist-packages/torch/include -I/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.6/dist-packages/torch/include/TH -I/usr/local/lib/python3.6/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c mmdet/ops/roi_align/src/roi_align_cuda.cpp -o build/temp.linux-x86_64-3.6/mmdet/ops/roi_align/src/roi_align_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=roi_align_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 mmdet/ops/roi_align/src/roi_align_cuda.cpp: In function ‘int roi_align_forward_cuda(at::Tensor, at::Tensor, int, int, float, int, at::Tensor)’: mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") ^ mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’ CHECK_CUDA(x);
    ^~~~~~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:31:3: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(features); ^ In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:11:0, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:5, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: error: ‘AT_CHECK’ was not declared in this scope #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") ^ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in definition of macro ‘CHECK_CUDA’ #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") ^~~~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:31:3: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(features); ^ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: suggested alternative: ‘DCHECK’ #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") ^ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in definition of macro ‘CHECK_CUDA’ #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") ^~~~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:31:3: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(features); ^ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") ^ mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’ CHECK_CUDA(x);
    ^~~~~~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:32:3: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(rois); ^ In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:11:0, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:5, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") ^ mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’ CHECK_CUDA(x);
    ^~~~~~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:33:3: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(output); ^ In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:11:0, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:5, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp: In function ‘int roi_align_backward_cuda(at::Tensor, at::Tensor, int, int, float, int, at::Tensor)’: mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") ^ mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’ CHECK_CUDA(x);
    ^~~~~~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:59:3: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(top_grad); ^ In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:11:0, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:5, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: error: ‘AT_CHECK’ was not declared in this scope #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") ^ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in definition of macro ‘CHECK_CUDA’ #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") ^~~~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:59:3: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(top_grad); ^ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: suggested alternative: ‘DCHECK’ #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") ^ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:23: note: in definition of macro ‘CHECK_CUDA’ #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") ^~~~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:59:3: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(top_grad); ^ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") ^ mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’ CHECK_CUDA(x);
    ^~~~~~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:60:3: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(rois); ^ In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:11:0, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:5, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:20:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ") ^ mmdet/ops/roi_align/src/roi_align_cuda.cpp:24:3: note: in expansion of macro ‘CHECK_CUDA’ CHECK_CUDA(x);
    ^~~~~~~~~~ mmdet/ops/roi_align/src/roi_align_cuda.cpp:61:3: note: in expansion of macro ‘CHECK_INPUT’ CHECK_INPUT(bottom_grad); ^ In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:11:0, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:5, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from mmdet/ops/roi_align/src/roi_align_cuda.cpp:1: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here DeprecatedTypeProperties & type() const { ^~~~ error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    CalledProcessError Traceback (most recent call last) in () ----> 1 get_ipython().run_cell_magic('shell', '', 'cd /content/Pedestron/\npython setup.py develop')

    2 frames /usr/local/lib/python3.6/dist-packages/google/colab/_system_commands.py in check_returncode(self) 136 if self.returncode: 137 raise subprocess.CalledProcessError( --> 138 returncode=self.returncode, cmd=self.args, output=self.output) 139 140 def repr_pretty(self, p, cycle): # pylint:disable=unused-argument

    CalledProcessError: Command 'cd /content/Pedestron/ python setup.py develop' returned non-zero exit status 1.`

    opened by gokulanv 8
  • test error

    test error

    when runing for test, the code needs val_gt.json file, so i change the path in test_city_person.py to "val_gt_for mmdetection.json". and get following problem.

    File "tools/test_city_person.py", line 225, in main() File "tools/test_city_person.py", line 219, in main MRs = validate('Pedestron/datasets/CityPersons/val_gt_for_mmdetction.json', args.out) File "Pedestron/tools/cityPerson/eval_demo.py", line 10, in validate cocoDt = cocoGt.loadRes(dt_path) File "Pedestron/tools/cityPerson/coco.py", line 313, in loadRes if 'caption' in anns[0]: IndexError: list index out of range

    opened by oujieww 7
  • Evaluating Caltech

    Evaluating Caltech

    Hello, I am fairly new to deep learning as well as github in general so I apologize if my questions are not clear.

    When I evaluate on Caltech, the output is a a single .json file with detections for 4,024 images. When I go to convert these with the convert to .txt, I was able to run the conversion code only if I called the convert_result(results_jsons) directly rather than using p.map().

    That being said, it creates a text file for each of the video files (V000.txt-V010.txt, depending on the set). Is this correct, or should the output be different?

    When I bring these .txt into matlab, how should I form the hierarchy of these results so that it is able to read everything properly?

    I am experiencing issues where the matlab code cannot find the detections and seems to be wanting a detection file per frame. Am I doing something wrong or am I simply misinterpreting the hierarchy?

    Thank you for your time and I am happy to provide any additional information that may help you or anyone else.

    opened by ChristianLus 6
  • How to finetune?

    How to finetune?

    Thanks for your work!! I have read your pre-print version (Sec6.2) about how to achieve the best performance on Citypersons. However, when I use the pre-trained CrowdHuman model (AP84.2) and finetune on the Citypersons with the lr 0.0025 (1 img, 1 GPU), the 5 epoch result decreases a lot (just 84.4 MR-2 on Reasonable set).
    Can you share more details about how to finetune? Do I use the inappropriate finetune parameters or datasets?

    opened by robotpp 6
  • pretrained model for wider pedestrain

    pretrained model for wider pedestrain

    Hi thanks for your nice work. Are you planning to add pretrained model purely trained on wider pedestrain? Also what is the difference between CrowdHuman 1 and CrowdHuman 2 in the pretrained-model?

    enhancement 
    opened by annie7777 6
  • Image_scale of Caltech while training

    Image_scale of Caltech while training

    Hi, there is a question about the image_scale in Caltech training. The parameters of image_scale in your code are [(416,320),(960,720)]. image Whlie training, the error(cuda out of memory) occured (I have 2 GeForce RTX 2080 and img_per_gpu is 1) . I want to know how the scale parameters are set and whether they can be changed. And is it influenced a lot to result if I change them? Thanks!

    opened by wzczc 5
Code for ACM MM 2020 paper "NOH-NMS: Improving Pedestrian Detection by Nearby Objects Hallucination"

NOH-NMS: Improving Pedestrian Detection by Nearby Objects Hallucination The offical implementation for the "NOH-NMS: Improving Pedestrian Detection by

Tencent YouTu Research 64 Nov 11, 2022
Official implementation of our paper "LLA: Loss-aware Label Assignment for Dense Pedestrian Detection" in Pytorch.

LLA: Loss-aware Label Assignment for Dense Pedestrian Detection This project provides an implementation for "LLA: Loss-aware Label Assignment for Dens

null 35 Dec 6, 2022
git《Beta R-CNN: Looking into Pedestrian Detection from Another Perspective》(NeurIPS 2020) GitHub:[fig3]

Beta R-CNN: Looking into Pedestrian Detection from Another Perspective This is the pytorch implementation of our paper "[Beta R-CNN: Looking into Pede

null 35 Sep 8, 2021
PED: DETR for Crowd Pedestrian Detection

PED: DETR for Crowd Pedestrian Detection Code for PED: DETR For (Crowd) Pedestrian Detection Paper PED: DETR for Crowd Pedestrian Detection Installati

null 36 Sep 13, 2022
A light and fast one class detection framework for edge devices. We provide face detector, head detector, pedestrian detector, vehicle detector......

A Light and Fast Face Detector for Edge Devices Big News: LFD, which is a big update of LFFD, now is released (2021.03.09). It is strongly recommended

YonghaoHe 1.3k Dec 25, 2022
GrailQA: Strongly Generalizable Question Answering

GrailQA is a new large-scale, high-quality KBQA dataset with 64,331 questions annotated with both answers and corresponding logical forms in different syntax (i.e., SPARQL, S-expression, etc.). It can be used to test three levels of generalization in KBQA: i.i.d., compositional, and zero-shot.

OSU DKI Lab 76 Dec 21, 2022
This is the pytorch implementation for the paper: Generalizable Mixed-Precision Quantization via Attribution Rank Preservation, which is accepted to ICCV2021.

GMPQ: Generalizable Mixed-Precision Quantization via Attribution Rank Preservation This is the pytorch implementation for the paper: Generalizable Mix

null 18 Sep 2, 2022
Code of paper "Compositionally Generalizable 3D Structure Prediction"

Compositionally Generalizable 3D Structure Prediction In this work, We bring in the concept of compositional generalizability and factorizes the 3D sh

Songfang Han 30 Dec 17, 2022
MetaDrive: Composing Diverse Scenarios for Generalizable Reinforcement Learning

MetaDrive: Composing Diverse Driving Scenarios for Generalizable RL [ Documentation | Demo Video ] MetaDrive is a driving simulator with the following

DeciForce: Crossroads of Machine Perception and Autonomy 276 Jan 4, 2023
[BMVC2021] The official implementation of "DomainMix: Learning Generalizable Person Re-Identification Without Human Annotations"

DomainMix [BMVC2021] The official implementation of "DomainMix: Learning Generalizable Person Re-Identification Without Human Annotations" [paper] [de

Wenhao Wang 17 Dec 20, 2022
Code for NeurIPS 2021 paper: Invariant Causal Imitation Learning for Generalizable Policies

Invariant Causal Imitation Learning for Generalizable Policies Ioana Bica, Daniel Jarrett, Mihaela van der Schaar Neural Information Processing System

Ioana Bica 17 Dec 1, 2022
DCSL - Generalizable Crowd Counting via Diverse Context Style Learning

DCSL Generalizable Crowd Counting via Diverse Context Style Learning Requirement

null 3 Jun 13, 2022
Implementation of "Generalizable Neural Performer: Learning Robust Radiance Fields for Human Novel View Synthesis"

Generalizable Neural Performer: Learning Robust Radiance Fields for Human Novel View Synthesis Abstract: This work targets at using a general deep lea

null 163 Dec 14, 2022
Learning to Reconstruct 3D Non-Cuboid Room Layout from a Single RGB Image

NonCuboidRoom Paper Learning to Reconstruct 3D Non-Cuboid Room Layout from a Single RGB Image Cheng Yang*, Jia Zheng*, Xili Dai, Rui Tang, Yi Ma, Xiao

null 67 Dec 15, 2022
FAST-RIR: FAST NEURAL DIFFUSE ROOM IMPULSE RESPONSE GENERATOR

This is the official implementation of our neural-network-based fast diffuse room impulse response generator (FAST-RIR) for generating room impulse responses (RIRs) for a given acoustic environment.

Anton Jeran Ratnarajah 89 Dec 22, 2022
Smart edu-autobooking - Johnson @ DMI-UNICT study room self-booking system

smart_edu-autobooking Sistema di autoprenotazione per l'aula studio Johnson@DMI-

Davide Carnemolla 17 Jun 20, 2022
[CVPR2021 Oral] UP-DETR: Unsupervised Pre-training for Object Detection with Transformers

UP-DETR: Unsupervised Pre-training for Object Detection with Transformers This is the official PyTorch implementation and models for UP-DETR paper: @a

dddzg 430 Dec 23, 2022
Repo for CVPR2021 paper "QPIC: Query-Based Pairwise Human-Object Interaction Detection with Image-Wide Contextual Information"

QPIC: Query-Based Pairwise Human-Object Interaction Detection with Image-Wide Contextual Information by Masato Tamura, Hiroki Ohashi, and Tomoaki Yosh

null 105 Dec 23, 2022
Official implementation of our CVPR2021 paper "OTA: Optimal Transport Assignment for Object Detection" in Pytorch.

OTA: Optimal Transport Assignment for Object Detection This project provides an implementation for our CVPR2021 paper "OTA: Optimal Transport Assignme

null 217 Jan 3, 2023