Git Product home page Git Product logo

ucas-vg / p2bnet Goto Github PK

View Code? Open in Web Editor NEW
63.0 2.0 8.0 10.87 MB

ECCV2022, Point-to-Box Network for Accurate Object Detection via Single Point Supervision

License: MIT License

Python 95.35% Shell 1.10% Dockerfile 0.05% Makefile 0.02% Batchfile 0.02% C++ 0.23% C 0.03% Cuda 0.12% Jupyter Notebook 3.08%
object-detection point-supervision weakly-supervised-detection annotation computer-vision detection point-supervised-object-detection weakly-supervised-learning

p2bnet's People

Contributors

darren-pfchen avatar yinglang 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

Watchers

 avatar  avatar

p2bnet's Issues

OOM in evaluation

Environment ( I have tried pytorch 1.9.0 and pytorch 1.8.0 and their corresponding cudnn/ mmcv-full =1.14.0, both will cause memory increasing when training.)

sys.platform: linux
Python: 3.8.17 (default, Jul 5 2023, 21:04:15) [GCC 11.2.0]
CUDA available: True
GPU 0: NVIDIA TITAN RTX
CUDA_HOME: /usr/local/cuda-10.2
NVCC: Cuda compilation tools, release 10.2, V10.2.89
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.10.0
PyTorch compiling details: PyTorch built with:

  • GCC 7.3
  • C++ Version: 201402
  • Intel(R) oneAPI Math Kernel Library Version 2023.1-Product Build 20230303 for Intel(R) 64 architecture applications
  • Intel(R) MKL-DNN v2.2.3 (Git Hash 7336ca9f055cf1bfa13efb658fe15dc9b41f0740)
  • OpenMP 201511 (a.k.a. OpenMP 4.5)
  • LAPACK is enabled (usually provided by MKL)
  • NNPACK is enabled
  • CPU capability usage: AVX512
  • CUDA Runtime 11.3
  • NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_37,code=compute_37
  • CuDNN 8.2
  • Magma 2.5.2
  • Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.3, CUDNN_VERSION=8.2.0, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.10.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON,

TorchVision: 0.11.1
OpenCV: 4.7.0
MMCV: 1.4.0
MMCV Compiler: GCC 7.3
MMCV CUDA Compiler: 11.3
MMDetection: 2.13.0+c820f32

2023-09-05 21:09:00,423 - mmdet - INFO - Distributed training: False
2023-09-05 21:09:01,221 - mmdet - INFO - Config:
checkpoint_config = dict(interval=1)
log_config = dict(interval=50, hooks=[dict(type='TextLoggerHook')])
custom_hooks = [dict(type='NumClassCheckHook')]
dist_params = dict(backend='nccl')
log_level = 'INFO'
load_from = None
resume_from = None
workflow = [('train', 1)]
norm_cfg = dict(type='GN', num_groups=32, requires_grad=True)

Bug Description

[>>> ] 426/3822, 16.0 task/s, elapsed: 27s, ETA: 213s
[>>> ] 427/3822, 15.9 task/s, elapsed: 27s, ETA: 214s
[>>> ] 428/3822, 15.9 task/s, elapsed: 27s, ETA: 213s
[>>> ] 429/3822, 15.9 task/s, elapsed: 27s, ETA: 213s
[>>> ] 430/3822, 15.9 task/s, elapsed: 27s, ETA: 213s
[>>> ] 431/3822, 15.9 task/s, elapsed: 27s, ETA: 214s
[>>> ] 432/3822, 15.9 task/s, elapsed: 27s, ETA: 213s
[>>> ] 433/3822, 15.9 task/s, elapsed: 27s, ETA: 213s
[>>> ] 434/3822, 15.9 task/s, elapsed: 27s, ETA: 213sTraceback (most recent call last):
File "tools/train.py", line 192, in
main()
File "tools/train.py", line 181, in main
train_detector(
File "/media/dell/data1/ljw/code/test1/CPR/P2BNet/TOV_mmdetection/mmdet/apis/train.py", line 172, in train_detector
runner.run(data_loaders, cfg.workflow)
File "/media/dell/data1/miniconda3/envs/mmdetp2b/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run
epoch_runner(data_loaders[i], **kwargs)
File "/media/dell/data1/miniconda3/envs/mmdetp2b/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 54, in train
self.call_hook('after_train_epoch')
File "/media/dell/data1/miniconda3/envs/mmdetp2b/lib/python3.8/site-packages/mmcv/runner/base_runner.py", line 307, in call_hook
getattr(hook, fn_name)(self)
File "/media/dell/data1/miniconda3/envs/mmdetp2b/lib/python3.8/site-packages/mmcv/runner/hooks/evaluation.py", line 267, in after_train_epoch
self._do_evaluate(runner)
File "/media/dell/data1/ljw/code/test1/CPR/P2BNet/TOV_mmdetection/mmdet/core/evaluation/eval_hooks.py", line 44, in _do_evaluate
results = single_gpu_test(runner.model, self.dataloader, show=False)
File "/media/dell/data1/ljw/code/test1/CPR/P2BNet/TOV_mmdetection/mmdet/apis/test.py", line 27, in single_gpu_test
result = model(return_loss=False, rescale=True, **data)
File "/media/dell/data1/miniconda3/envs/mmdetp2b/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/media/dell/data1/miniconda3/envs/mmdetp2b/lib/python3.8/site-packages/mmcv/parallel/data_parallel.py", line 50, in forward
return super().forward(*inputs, **kwargs)
File "/media/dell/data1/miniconda3/envs/mmdetp2b/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 166, in forward
return self.module(*inputs[0], **kwargs[0])
File "/media/dell/data1/miniconda3/envs/mmdetp2b/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/media/dell/data1/miniconda3/envs/mmdetp2b/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 98, in new_func
return old_func(*args, **kwargs)
File "/media/dell/data1/ljw/code/test1/CPR/P2BNet/TOV_mmdetection/mmdet/models/detectors/base.py", line 177, in forward
return self.forward_test(img, img_metas, **kwargs)
File "/media/dell/data1/ljw/code/test1/CPR/P2BNet/TOV_mmdetection/mmdet/models/detectors/base.py", line 150, in forward_test
return self.simple_test(imgs[0], img_metas[0], **kwargs)
File "/media/dell/data1/ljw/code/test1/CPR/P2BNet/TOV_mmdetection/mmdet/models/detectors/P2BNet.py", line 375, in simple_test
test_result, pseudo_boxes = self.roi_head.simple_test(stage,
File "/media/dell/data1/ljw/code/test1/CPR/P2BNet/TOV_mmdetection/mmdet/models/roi_heads/P2B_head.py", line 446, in simple_test
det_bboxes, det_labels, pseudo_bboxes = self.simple_test_bboxes(
File "/media/dell/data1/ljw/code/test1/CPR/P2BNet/TOV_mmdetection/mmdet/models/roi_heads/P2B_head.py", line 474, in simple_test_bboxes
bbox_results = self._bbox_forward(x, rois, gt_bboxes, stage)
File "/media/dell/data1/ljw/code/test1/CPR/P2BNet/TOV_mmdetection/mmdet/models/roi_heads/P2B_head.py", line 210, in _bbox_forward
bbox_feats = self.bbox_roi_extractor(
File "/media/dell/data1/miniconda3/envs/mmdetp2b/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in call_impl
return forward_call(*input, **kwargs)
File "/media/dell/data1/miniconda3/envs/mmdetp2b/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 186, in new_func
return old_func(*args, **kwargs)
File "/media/dell/data1/ljw/code/test1/CPR/P2BNet/TOV_mmdetection/mmdet/models/roi_heads/roi_extractors/single_level_roi_extractor.py", line 102, in forward
roi_feats_t = self.roi_layers[i](feats[i], rois
)
File "/media/dell/data1/miniconda3/envs/mmdetp2b/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/media/dell/data1/miniconda3/envs/mmdetp2b/lib/python3.8/site-packages/mmcv/ops/roi_align.py", line 212, in forward
return roi_align(input, rois, self.output_size, self.spatial_scale,
File "/media/dell/data1/miniconda3/envs/mmdetp2b/lib/python3.8/site-packages/mmcv/ops/roi_align.py", line 84, in forward
output = input.new_zeros(output_shape)
RuntimeError: CUDA out of memory. Tried to allocate 2.28 GiB (GPU 0; 23.65 GiB total capacity; 14.99 GiB already allocated; 1.28 GiB free; 21.04 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

how to get true box?

Hello, I would like to know if my data is originally marked with points annotations, but not marked with bbox, how to implement true box?

How to train on one GPU

I set the batch size to 8 on one gpu, how should I set the learning rate
When I set the learning rate to 0.01, the ap value on coco2017 is only 20.0

About the reproduction of this paper.

Hi, i am very interested about the new method, i wonder if the baseline of this paper can be reproduced stably? Since when i use my computational resource to train this network, i find it hard to reach the same precision as in the paper. Thanks for your excellent work!

The performance only based on Resnet50

Dear authors:

Thanks for your great job! What are the mean-IoU results of P2BNet when only ResNet50 is used without the FPN help?

By the way, would it be helpful if I were to share the backbone of both P2B and FasterRCNN?

Google Driver Link

Hi, The google Google Drive link to download the pretrained weights doesn't work.

Performance on Pascal VOC

Hi! Thanks for your great job!
I am curious about the results of your proposed P2BNet on VOC2007. Could you please show me the performance? Thanks a lot!

P2BNet on DOTA

I have tried to train on DOTA using the COCO config, but got a bad result, the minimum loss displayed when training was more than 0.1, and the pseudo box in visualization is terrible. Does this model not apply to remote sensing data sets? these are one pic of my results and train information:
00004

image

strange result

The following code was executed

[cmd 0] inference with trained P2BNet to get pseudo box

work_dir='../TOV_mmdetection_cache/work_dir/coco/' && CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 PORT=10000 tools/dist_train.sh configs2/COCO/P2BNet/P2BNet_r50_fpn_1x_coco_ms.py 8
--work-dir=${work_dir}
--cfg-options evaluation.save_result_file=${work_dir}'_1200_latest_result.json' load_from=${work_dir}'P2BNet/epoch_12.pth' evaluation.do_first_eval=True runner.max_epochs=0

1661946453484
Wonder why the results are so bad

About point annotations

Hello, I would like to know how to generate point annotations in other data sets, such as voc2007

CUDA out of memory

Hello,I would like to know why the memory has been increasing when training?The device are 4* RTX3090.Is there a solution to solve the problem? Thank you.

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.