SamsungLabs / td3d

[WACV'24] TD3D: Top-Down Beats Bottom-Up in 3D Instance Segmentation
Other
135 stars 7 forks source link

KeyError: 'TD3DInstanceSegmentor is not in the models registry' #17

Closed mostafa501 closed 10 months ago

mostafa501 commented 11 months ago

Hello, thank you for publishing this work, we are trying to use your netwok te sepatare our own point cloud objects, first we tried to use the demo data in TR3D network. We installed the required libraries as explained.


We are using the demo script to segment the demo data, here is the script we use: ''' from argparse import ArgumentParser from mmdet3d.apis import inference_segmentor, init_model, show_result_meshlab

parser = ArgumentParser() parser.add_argument('--pcd', default='/media/navlab/GNSS/work/instance_segmentation/td3d-main/demo/data/scannet/scene0000_00.bin', help='Point cloud file') parser.add_argument('--config', default='/media/navlab/GNSS/work/instance_segmentation/td3d-main/configs/td3d_is/td3d_is_scannet-3d-18class.py', help='Config file') parser.add_argument('--checkpoint', default='/media/navlab/GNSS/work/instance_segmentation/td3d-main/pretrained_models/td3d_scannet.pth', help='Checkpoint file') parser.add_argument('--device', default='cuda:0', help='Device used for inference') parser.add_argument('--out-dir', type=str, default='/media/navlab/GNSS/work/instance_segmentation/td3d-main/evaluate_results/try1', help='dir to save results') parser.add_argument('--show',action='store_true',help='show online visualization results') parser.add_argument('--snapshot', action='store_true', help='whether to save online visualization results') args = parser.parse_args()

model = init_model(args.config, args.checkpoint, device=args.device) result, data = inference_segmentor(model, args.pcd) show_result_meshlab(data,result,args.out_dir,show=args.show,snapshot=args.snapshot,task='seg', palette=model.PALETTE) '''


But we got this error: (td3d1) navlab@navlab-ProLiant-DL380-Gen10:/media/navlab/GNSS/work/instance_segmentation/td3d-main$ /home/navlab/anaconda3/envs/td3d1/bin/python /media/navlab/GNSS/work/instance_segmentation/td3d-main/demo/pc_seg_demo_ok.py /home/navlab/anaconda3/envs/td3d1/lib/python3.7/site-packages/MinkowskiEngine/init.py:42: UserWarning: The environment variable OMP_NUM_THREADS not set. MinkowskiEngine will automatically set OMP_NUM_THREADS=16. If you want to set OMP_NUM_THREADS manually, please export it on the command line before running a python script. e.g. export OMP_NUM_THREADS=12; python your_program.py. It is recommended to set it below 24. "It is recommended to set it below 24.", Traceback (most recent call last): File "/media/navlab/GNSS/work/instance_segmentation/td3d-main/demo/pc_seg_demo_ok.py", line 17, in model = init_model(args.config, args.checkpoint, device=args.device) File "/home/navlab/anaconda3/envs/td3d1/lib/python3.7/site-packages/mmdet3d/apis/inference.py", line 60, in init_model model = build_model(config.model, test_cfg=config.get('test_cfg')) File "/home/navlab/anaconda3/envs/td3d1/lib/python3.7/site-packages/mmdet3d/models/builder.py", line 122, in build_model return build_detector(cfg, train_cfg=train_cfg, test_cfg=test_cfg) File "/home/navlab/anaconda3/envs/td3d1/lib/python3.7/site-packages/mmdet3d/models/builder.py", line 96, in build_detector cfg, default_args=dict(train_cfg=train_cfg, test_cfg=test_cfg)) File "/home/navlab/anaconda3/envs/td3d1/lib/python3.7/site-packages/mmcv/utils/registry.py", line 237, in build return self.build_func(*args, **kwargs, registry=self) File "/home/navlab/anaconda3/envs/td3d1/lib/python3.7/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "/home/navlab/anaconda3/envs/td3d1/lib/python3.7/site-packages/mmcv/utils/registry.py", line 62, in build_from_cfg f'{obj_type} is not in the {registry.name} registry') KeyError: 'TD3DInstanceSegmentor is not in the models registry'


Althgouh, we installed all these libraries: Package Version absl-py 2.0.0 addict 2.4.0 albumentations 1.3.0 aliyun-python-sdk-core 2.14.0 aliyun-python-sdk-kms 2.16.2 ansi2html 1.8.0 anyio 3.7.1 argon2-cffi 23.1.0 argon2-cffi-bindings 21.2.0 attrs 23.1.0 backcall 0.2.0 beautifulsoup4 4.12.2 black 23.3.0 bleach 6.0.0 cachetools 5.3.2 certifi 2022.12.7 cffi 1.15.1 chamfer 2.0.0 charset-normalizer 3.3.2 click 8.1.7 colorama 0.4.6 comm 0.1.4 ConfigArgParse 1.7 crcmod 1.7 cryptography 41.0.5 cycler 0.11.0 dash 2.14.1 dash-core-components 2.0.0 dash-html-components 2.0.0 dash-table 5.0.0 debugpy 1.7.0 decorator 5.1.1 defusedxml 0.7.1 descartes 1.1.0 emd-ext 0.0.0 entrypoints 0.4 exceptiongroup 1.1.3 fastjsonschema 2.18.1 fire 0.5.0 flake8 3.9.2 Flask 2.2.5 fonttools 4.38.0 google-auth 2.23.4 google-auth-oauthlib 0.4.6 grpcio 1.59.2 idna 3.4 imageio 2.31.2 importlib-metadata 6.7.0 importlib-resources 5.12.0 iniconfig 2.0.0 ipykernel 6.16.2 ipython 7.34.0 ipython-genutils 0.2.0 ipywidgets 8.1.1 itsdangerous 2.1.2 jedi 0.19.1 Jinja2 3.1.2 jmespath 0.10.0 joblib 1.3.2 jsonschema 4.17.3 jupyter 1.0.0 jupyter_client 7.4.9 jupyter-console 6.6.3 jupyter_core 4.12.0 jupyter-server 1.24.0 jupyterlab-pygments 0.2.2 jupyterlab-widgets 3.0.9 kiwisolver 1.4.5 llvmlite 0.36.0 lyft-dataset-sdk 0.0.8 Markdown 3.4.4 markdown-it-py 2.2.0 MarkupSafe 2.1.3 matplotlib 3.5.3 matplotlib-inline 0.1.6 mccabe 0.6.1 mdurl 0.1.2 MinkowskiEngine 0.5.4 mistune 3.0.2 mmcls 0.25.0 mmcv-full 1.6.0 mmdet 2.24.1 mmdet3d 1.0.0rc3 mmsegmentation 0.24.1 model-index 0.1.11 mypy-extensions 1.0.0 nbclassic 1.0.0 nbclient 0.7.4 nbconvert 7.6.0 nbformat 5.7.0 nest-asyncio 1.5.8 networkx 2.2 notebook 6.5.6 notebook_shim 0.2.3 numba 0.53.0 numpy 1.21.5 nuscenes-devkit 1.1.9 oauthlib 3.2.2 open3d 0.17.0 opencv-python 4.8.1.78 opencv-python-headless 4.8.1.78 opendatalab 0.0.10 openmim 0.3.9 openxlab 0.0.10 ordered-set 4.1.0 oss2 2.17.0 packaging 23.2 pandas 1.1.5 pandocfilters 1.5.0 parso 0.8.3 pathspec 0.11.2 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.5.0 pip 22.3.1 pkgutil_resolve_name 1.3.10 platformdirs 3.11.0 plotly 5.18.0 pluggy 1.2.0 plyfile 0.7.4 prettytable 3.7.0 prometheus-client 0.17.1 prompt-toolkit 3.0.39 protobuf 3.20.3 psutil 5.9.6 ptyprocess 0.7.0 pyasn1 0.5.0 pyasn1-modules 0.3.0 pycocotools 2.0.7 pycodestyle 2.7.0 pycparser 2.21 pycryptodome 3.19.0 pyflakes 2.3.1 Pygments 2.16.1 pyparsing 3.1.1 pyquaternion 0.9.9 pyrsistent 0.19.3 pytest 7.4.3 python-dateutil 2.8.2 pytz 2023.3.post1 PyWavelets 1.3.0 PyYAML 6.0.1 pyzmq 24.0.1 qtconsole 5.4.4 QtPy 2.4.1 qudida 0.0.4 requests 2.28.2 requests-oauthlib 1.3.1 retrying 1.3.4 rich 13.6.0 rsa 4.9 scikit-image 0.19.3 scikit-learn 1.0.2 scipy 1.7.3 Send2Trash 1.8.2 setuptools 65.6.3 shapely 2.0.2 six 1.16.0 sniffio 1.3.0 soupsieve 2.4.1 tabulate 0.9.0 tenacity 8.2.3 tensorboard 2.11.2 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 termcolor 2.3.0 terminado 0.17.1 terminaltables 3.1.10 threadpoolctl 3.1.0 tifffile 2021.11.2 tinycss2 1.2.1 tomli 2.0.1 torch 1.8.1+cu101 torchaudio 0.8.1 torchvision 0.9.1+cu101 tornado 6.2 tqdm 4.65.2 traitlets 5.9.0 trimesh 2.35.39 typed-ast 1.5.5 typing_extensions 4.7.1 urllib3 1.26.18 wcwidth 0.2.9 webencodings 0.5.1 websocket-client 1.6.1 Werkzeug 2.2.3 wheel 0.38.4 widgetsnbextension 4.0.9 yapf 0.40.2 zipp 3.15.0


Could you please help us to overcome this error? Thank you so much. Regards

filaPro commented 11 months ago

"/home/navlab/anaconda3/envs/td3d1/lib/python3.7/site-packages/mmdet3d/apis/inference.py"

You should not install mmdet3d throw pip. It should be imported from td3d/mmdet3d.