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

GTK Error and leaked semophore #20

Closed
anandijain opened this issue Oct 12, 2019 · 1 comment
Closed

GTK Error and leaked semophore #20

anandijain opened this issue Oct 12, 2019 · 1 comment

Comments

@anandijain
Copy link

If you do not know the root cause of the problem / bug, and wish someone to help you, please
include:

I am trying to run the demo script, I have followed the installation in INSTALL.md.
I have an mp4 file and a jpg that I am trying to test.

I get this error when running these:
python3 demo/demo.py --config-file configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml --input demo/photo.jpg --opts MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl

python3 demo/demo.py --config-file configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml --video-input demo/video.mp4 --opts MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl

(demo.py:23305): Gtk-ERROR **: 22:18:12.953: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
/usr/lib/python3.6/multiprocessing/semaphore_tracker.py:143: UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown
  len(cache))
Trace/breakpoint trap (core dumped)

To Reproduce

I have not changed any of the source, I installed and then ran.
The commands are listed above.
I can provide more details if needed, I don't have a 'full log'.

Expected behavior

I was expecting the model to show me the object detections for the video and the image.
I am not too familiar with GTK or multiprocessing, so I don't have a great idea for how to resolve this myself.

Environment

I am on Ubuntu 18.04 on a Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz.
My graphics cards is a GTX 970.

---------------------  --------------------------------------------------
Python                 3.6.8 (default, Oct  7 2019, 12:59:55) [GCC 8.3.0]
Detectron2 Compiler    GCC 7.4
DETECTRON2_ENV_MODULE  <not set>
PyTorch                1.3.0
PyTorch Debug Build    False
CUDA available         True
GPU 0                  GeForce GTX 970
Pillow                 6.0.0
cv2                    4.1.0
---------------------  --------------------------------------------------
PyTorch built with:
  - GCC 7.3
  - Intel(R) Math Kernel Library Version 2019.0.4 Product Build 20190411 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.20.5 (Git Hash 0125f28c61c1f822fd48570b4c1066f96fcb9b2e)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - NNPACK is enabled
  - CUDA Runtime 10.1
  - NVCC architecture flags: -gencode;arch=compute_35,code=sm_35;-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_50,code=compute_50
  - CuDNN 7.6.3
  - Magma 2.5.1
  - Build settings: BLAS=MKL, BUILD_NAMEDTENSOR=OFF, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -fopenmp -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -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-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -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 -Wno-stringop-overflow, DISABLE_NUMA=1, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=True, 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, USE_STATIC_DISPATCH=OFF,

Thank you, let me know if more information is needed.

@ppwwyyxx
Copy link
Contributor

Your version of opencv cannot do imshow. According to the message, it is likely because the GTK version it is built with, is incompatible with some other libraries that's being used (likely matplotlib).

You can use --output to save outputs to files so it does not have to show a window.

To resolve this you'll need to find a different way to install opencv or in the worst case recompile it with proper GTK support so that it works in your environment. We unfortunately cannot help more since it is about installation of opencv.

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

No branches or pull requests

2 participants