question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Video inference not displaying bounding boxes, only masks

See original GitHub issue

Instructions To Reproduce the Issue:

Running the standard demo inference strangely I got an output only displaying masks.

  1. What exact command you run:
python demo.py --config-file ~/VM/R101-FPN2-SDO2-FULL2-Longer/config.yaml --video-input ~/VM/png/output.mp4 --confidence-threshold 0.7 --output ~/VM/video-output4.mkv --opts MODEL.WEIGHTS ~/VM/R101-FPN2-SDO2-FULL2-Longer/model_final.pth

Expected behavior:

Normal display. Can this be related to the config? I used the one saved by DefaultTrainer, although it makes sense I’m not sure it is supposed to.

Any solution?

Environment:

sys.platform            linux
Python                  3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0]
numpy                   1.20.3
detectron2              0.4.1 @/home/amourato/anaconda3/lib/python3.8/site-packages/detectron2
Compiler                GCC 7.5
CUDA compiler           CUDA 11.0
detectron2 arch flags   6.1
DETECTRON2_ENV_MODULE   <not set>
PyTorch                 1.9.0 @/home/amourato/anaconda3/lib/python3.8/site-packages/torch
PyTorch debug build     False
GPU available           Yes
GPU 0,1,2,3             NVIDIA GeForce GTX 1070 (arch=6.1)
CUDA_HOME               /usr/local/cuda
Pillow                  8.3.1
torchvision             0.10.0 @/home/amourato/anaconda3/lib/python3.8/site-packages/torchvision
torchvision arch flags  3.5, 5.0, 6.0, 7.0, 7.5, 8.0, 8.6
fvcore                  0.1.5.post20210719
iopath                  0.1.8
cv2                     4.4.0
----------------------  ------------------------------------------------------------------------
PyTorch built with:
  - GCC 7.3
  - C++ Version: 201402
  - Intel(R) oneAPI Math Kernel Library Version 2021.3-Product Build 20210617 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v2.1.2 (Git Hash 98be7e8afa711dc9b66c8ff3504129cb82013cdb)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - CUDA Runtime 11.1
  - 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.0.5
  - Magma 2.5.2
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.1, CUDNN_VERSION=8.0.5, 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 -DSYM
BOLICATE_MOBILE_DEBUG_HANDLE -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.9.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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
ppwwyyxxcommented, Sep 3, 2021

It turns out that this is expected behavior: whenever we visualize a video we don’t show bounding boxes if masks are available. This would happen for any config and model.

https://github.com/facebookresearch/detectron2/blob/23486b6f503490d8c526d206eb057ec33615f2de/detectron2/utils/video_visualizer.py#L101-L108

0reactions
AKMouratocommented, Sep 3, 2021

Thanks @ppwwyyxx

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mask RCNN shows bounding boxes without mask after training
It was due to insufficient amount of steps trained. Took more than 1000 steps for masks to show up.
Read more >
Segment Objects without Masks and Reduce Annotation Effort ...
The framework generates instance segmentation directly from bounding box supervisions, rather than using mask annotations to directly supervise ...
Read more >
Image, Video and Real-Time Webcam Object Detection ...
The model generates bounding boxes and segmentation masks for each instance of an object in the image. It's based on Feature Pyramid Network...
Read more >
Mask Detection using YOLOv5 - Towards Data Science
The model is unable to detect incorrectly worn masks which is one of the classes. This is most probably due to the large...
Read more >
Generating Masks From Boxes by Mining Spatio-Temporal ...
masks from per-frame bounding box annotations in videos. ... sion, we aim to use detailed information of not only the tar-.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found