Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

detectron dependency in tools #447

Closed
botcs opened this issue Feb 17, 2019 · 3 comments
Closed

detectron dependency in tools #447

botcs opened this issue Feb 17, 2019 · 3 comments
Labels
contributions welcome enhancement New feature or request good first issue Good for newcomers

Comments

@botcs
Copy link
Contributor

botcs commented Feb 17, 2019

🐛 Bug

As suggested in the data/README.md tools/convert_cityscapes_to_coco.py requires detectron to be installed.

To Reproduce

Steps to reproduce the behavior:

  1. Install maskrcnn_benchmark following the INSTALL.md
  2. Install additional dependencies for the script: pip install h5py scipy opencv-python
  3. run python tools/cityscapes/convert_cityscapes_to_coco.py

Error:

ModuleNotFoundError: No module named 'detectron'

Environment

PyTorch version: 1.0.0.dev20190207
Is debug build: No
CUDA used to build PyTorch: 10.0.130

OS: Ubuntu 16.04.5 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
CMake version: version 3.5.1

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration:
GPU 0: GeForce RTX 2080
GPU 1: GeForce RTX 2080

Nvidia driver version: 410.72
cuDNN version: Could not collect

Versions of relevant libraries:
[pip] numpy==1.16.1
[pip] torch==1.0.0.dev20190207
[pip] torchvision==0.2.1
[conda] blas 1.0 mkl
[conda] mkl 2019.1 144
[conda] mkl_fft 1.0.10 py36ha843d7b_0
[conda] mkl_random 1.0.2 py36hd81dba3_0
[conda] pytorch-nightly 1.0.0.dev20190207 py3.6_cuda10.0.130_cudnn7.4.2_0 pytorch

@fmassa
Copy link
Contributor

fmassa commented Feb 18, 2019

Oh, you are totally right, thanks for spotting this!

The dependency on Detectron is really not necessary, and was probably an oversight from #232

There are only a couple of places where detectron is needed, and only two functions are used, see

ann['bbox'] = bboxs_util.xyxy_to_xywh(
segms_util.polys_to_boxes(
[ann['segmentation']])).tolist()[0]

We already have something similar to bboxs_util.xyxy_to_xywh in BoxList via the convert method. The second function can be taken from Detectron to avoid this dependency.

Contributions are more than welcome! :-)

@fmassa
Copy link
Contributor

fmassa commented Feb 18, 2019

Actually, I'd like to keep this open until the dependency on detectron is removed.

@botcs
Copy link
Contributor Author

botcs commented Feb 18, 2019

sorry, I have closed it accidentally.
I have a new PR on the detectron free implementation :)

@botcs botcs closed this as completed Mar 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contributions welcome enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants