junjiehe96 / FastInst

[CVPR2023] FastInst: A Simple Query-Based Model for Real-Time Instance Segmentation
MIT License
175 stars 16 forks source link

Training error #4

Closed GreaBugs closed 1 year ago

GreaBugs commented 1 year ago

Running train net.py file occurred Error: TypeError : init () Got an unexpected keyword argument 'dtype', error location is detection2/engine/train loop.py May I ask if anyone has encountered the same problem? How did you solve it?

JIAZHAOQIAN commented 1 year ago

This is because torch.cuda.amp.autocast() does not have the dtype parameter. Please modify "with autocast(dtype=self.precision)" to "with autocast()" to fix this problem (line 491 in detectron2/detectron2/engine/train_loop.py).

GreaBugs commented 1 year ago

anaconda3/envs/fastinst/lib/python3.8/site-packages/shapely/set_operations.py:133: RuntimeWarning: invalid value encountered in intersection return lib.intersection(a, b, **kwargs)

File "/anaconda3/envs/fastinst/lib/python3.8/site-packages/torch/utils/tensorboard/init.py", line 4, in LooseVersion = distutils.version.LooseVersion

AttributeError: module 'distutils' has no attribute 'version' As you said, what is the reason for this error now?

JIAZHAOQIAN commented 1 year ago

This is due to the update of setuptools. First, pip uninstall setuptools, then, pip or conda install setuptools==58.0.4.

GreaBugs commented 1 year ago

pip uninstall setuptools pip install setuptools==58.0.4 and pip uninstall shapely pip install shapely==v1.8.5