MikhailMashukov / particles_nsu

Public repository with core code for counting particles by means of neural networks
4 stars 1 forks source link

I got a bug below, Can I know the version of mmcv and mmdet you use? Thanks #2

Open Thangbluee opened 3 years ago

Thangbluee commented 3 years ago

Processing sample/Pt-HOPG-01-0041.bmp building model (config cascade_mask_rcnn_x101_64x4d_fpn_1x_nanopart_3_0.py, weights weights/epoch_500_3x.pth) /home/iot/anaconda3/envs/torchreid/lib/python3.7/site-packages/mmdet/models/builder.py:53: UserWarning: train_cfg and test_cfg is deprecated, please specify them in model 'please specify them in model', UserWarning) Traceback (most recent call last): File "/home/iot/anaconda3/envs/torchreid/lib/python3.7/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg return obj_cls(**args) TypeError: init() got an unexpected keyword argument 'num_stages'

MikhailMashukov commented 3 years ago

Oh, we used some current mmdetection and use it still in order not to break working models... mmcv==0.2.14 -e git+https://github.com/open-mmlab/mmdetection.git@d0c041876338de0796b875476db3025676c135d8#egg=mmdet

Thangbluee commented 3 years ago

Can you provide full requirement of your wonderful project? I have problems with the version of the libraries. Thanks

MikhailMashukov commented 3 years ago

:) pip freeze: absl-py==0.8.1 addict==2.2.1 albumentations==0.4.3 APScheduler==3.6.3 astor==0.8.0 backcall==0.1.0 certifi==2019.11.28 cffi==1.13.2 chardet==3.0.4 cryptography==3.3.1 cycler==0.10.0 Cython==0.29.14 decorator==4.4.1 gast==0.3.2 google-pasta==0.1.8 grpcio==1.16.1 h5py==2.8.0 idna==2.8 imagecorruptions==1.1.0 imageio==2.6.1 imgaug==0.3.0 ipykernel==5.1.3 ipython==7.10.2 ipython-genutils==0.2.0 jedi==0.15.1 jupyter-client==5.3.4 jupyter-core==4.6.1 Keras==2.2.4 Keras-Applications==1.0.8 Keras-Preprocessing==1.1.0 kiwisolver==1.1.0 Markdown==3.1.1 matplotlib==3.1.1 mkl-fft==1.0.15 mkl-random==1.1.0 mkl-service==2.3.0 mmcv==0.2.14 -e git+https://github.com/open-mmlab/mmdetection.git@d0c041876338de0796b875476db3025676c135d8#egg=mmdet networkx==2.4 numpy==1.17.3 olefile==0.46 opencv-python==4.1.1.26 opencv-python-headless==4.1.1.26 pandas==0.25.3 parso==0.5.2 pexpect==4.7.0 pickleshare==0.7.5 Pillow==6.2.1 prompt-toolkit==3.0.2 protobuf==3.10.1 psutil==5.6.7 ptyprocess==0.6.0 pycocotools==2.0.0 pycparser==2.19 Pygments==2.5.2 pyparsing==2.4.5 python-dateutil==2.8.1 python-telegram-bot==13.1 pytz==2019.3 PyWavelets==1.1.1 PyYAML==5.2 pyzmq==18.1.0 requests==2.22.0 scikit-image==0.16.2 scipy==1.3.1 seaborn==0.11.1 Shapely==1.6.4.post2 six==1.13.0 tabulate==0.8.6 tensorboard==1.14.0 tensorflow==1.14.0 tensorflow-estimator==1.14.0 termcolor==1.1.0 terminaltables==3.1.0 torch==1.3.1 torchvision==0.4.2 tornado==6.0.3 traitlets==4.3.3 tzlocal==2.1 urllib3==1.25.7 wcwidth==0.1.7 Werkzeug==0.16.0 wrapt==1.11.2

MikhailMashukov commented 3 years ago

We installed this under anaconda. It was tricky to build mmdetection... It may fail because of undesired version of gcc. And we also needed trick with anacoda's activate.d to switch from CUDA 9 installed as main on the machine to CUDA 10: PATH=/usr/local/cuda-10.0/bin:$PATH Python is 3.7

Thangbluee commented 2 years ago

@MikhailMashukov thanks for your replying. When i run python nano_predict.py , get an error: "AttributeError: 'ConfigDict' object has no attribute 'nms'" I use CUDA 11 so I have to install mmdet V2 and I fix something in your config file, because your config file configured follow mmdet V1. So I follow mmdet tutorial to train model. it gets error : "KeyError: "stm is not in the dataset registry'" so I change dataset_type to 'CocoDataset' it still gets error:
File "/home/iot/anaconda3/envs/particle/lib/python3.7/site-packages/mmdet/datasets/samplers/group_sampler.py", line 36, in iter indices = np.concatenate(indices) File "<__array_function__ internals>", line 6, in concatenate ValueError: need at least one array to concatenate

Im new with mmdet and mmcv. @MikhailMashukov Please help!

Thangbluee commented 2 years ago

Updated I fixed the bug above. I will train the model and wait to see the result, thanks for your supporting!