Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualize the three channels of YOLOv5 backbone in 15min to get started det ,process blocked #723

Closed
3 tasks done
ding19980201 opened this issue Apr 9, 2023 · 4 comments

Comments

@ding19980201
Copy link

Prerequisite

🐞 Describe the bug

python demo/featmap_vis_demo.py data/cat/images/IMG_20221020_112705.jpg \
                                configs/yolov5/yolov5_s-v61_fast_1xb12-40e_cat.py \
                                work_dirs/yolov5_s-v61_fast_1xb12-40e_cat/epoch_40.pth \
                                --target-layers backbone \
                                --channel-reduction squeeze_mean

HERE IS display

(DYX-MMLAB) dyx@dyx-MS-7C82:~/project/mmyolo$ python demo/featmap_vis_demo.py data/cat/images/IMG_20221020_112705.jpg \
>                                 configs/yolov5/yolov5_s-v61_fast_1xb12-40e_cat.py \
>                                 work_dirs/yolov5_s-v61_fast_1xb12-40e_cat/epoch_40.pth \
>                                 --target-layers backbone \
>                                 --channel-reduction squeeze_mean
!!!You are using `YOLOv5Head` with num_classes == 1. The loss_cls will be 0. This is a normal phenomenon.
Loads checkpoint by local backend from path: work_dirs/yolov5_s-v61_fast_1xb12-40e_cat/epoch_40.pth
04/09 11:29:52 - mmengine - WARNING - "FileClient" will be deprecated in future. Please use io functions in https://mmengine.readthedocs.io/en/latest/api/fileio.html#file-io
04/09 11:29:52 - mmengine - WARNING - "HardDiskBackend" is the alias of "LocalBackend" and the former will be deprecated in future.
04/09 11:29:54 - mmengine - WARNING - `Visualizer` backend is not initialized because save_dir is None.
[                                                  ] 0/1, elapsed: 0s, 
ETA:/home/dyx/anaconda3/envs/DYX-MMLAB/lib/python3.9/site-packages/mmengine/visualization/visualizer.py:968: UserWarning: Since the spatial dimensions of overlaid_image: (3000, 4000) and featmap: torch.Size([80, 80]) are not same, the feature map will be interpolated. This may cause mismatch problems !
  warnings.warn(
^Z
[1]+  已停止               python demo/featmap_vis_demo.py data/cat/images/IMG_20221020_112705.jpg configs/yolov5/yolov5_s-v61_fast_1xb12-40e_cat.py work_dirs/yolov5_s-v61_fast_1xb12-40e_cat/epoch_40.pth --target-layers backbone --channel-reduction squeeze_mean



i can do nothing as the computer be blocked
i can only restart my conputer


Environment

sys.platform: linux
Python: 3.9.16 (main, Mar 8 2023, 14:00:05) [GCC 11.2.0]
CUDA available: True
numpy_random_seed: 2147483648
GPU 0: NVIDIA GeForce RTX 3070
CUDA_HOME: /usr
NVCC: Cuda compilation tools, release 9.1, V9.1.8
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.12.1+cu113
PyTorch compiling details: PyTorch built with:

  • GCC 9.3
  • C++ Version: 201402
  • Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
  • Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)
  • OpenMP 201511 (a.k.a. OpenMP 4.5)
  • LAPACK is enabled (usually provided by MKL)
  • NNPACK is enabled
  • CPU capability usage: AVX2
  • 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_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
  • CuDNN 8.3.2 (built against CUDA 11.5)
  • Magma 2.5.2
  • Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.3, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -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-unused-parameter -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 -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.12.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=OFF, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF,

TorchVision: 0.13.1+cu113
OpenCV: 4.7.0
MMEngine: 0.7.0
MMCV: 2.0.0rc4
MMDetection: 3.0.0rc6
MMYOLO: 0.5.0+dc85144

进程已结束,退出代码0

Additional information

AS I CREATE environment including mmdetection mmtracking mmyolo they are all using openmmlab2.0
i DONT follow the environment create turtoils strictly
perhaps it is the reason
HOWEVER I CAN train well on this environment @lindahua @grimoire @zhiqwang @lvhan028 @

@ding19980201
Copy link
Author

some problems happen to my env. I test on another computer ,i runs well

@ding19980201
Copy link
Author

I have debuged again it is very slow but it runs successfully. my image shape is 3000,4000,3 I guess it is very hard to run this big shape . However i run command following the turtail. does anyone have the same problem??

@ding19980201
Copy link
Author

ding19980201 commented Apr 10, 2023

image
image
thefirst featmap is 12830004000 and it equals about 6GB the second and third is 25630004000 51230004000 @grimoire @lindahua @zhiqwang @lvhan028

@hhaAndroid
Copy link
Collaborator

@ding19980201 If the input size is too large, it can indeed cause many problems. For now, we haven't considered such large inputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants