Some common problems in YOLO environment configuration

        When getting started with YOLO, the environment configuration is an unavoidable hurdle. This article hopes to help you solve some difficult and miscellaneous diseases by listing some common problems. However, different computers have different environmental configurations. This article cannot cover everything. You still need to master your ability to search and solve problems online.

1、subprocess.CalledProcessError: Command ‘pip install ‘pycocotools>=2.0

Workaround: (regular pip install doesn't work)

        Install with the following command

conda install -c esri pycocotools

2、ValueError: Format ‘jpg‘ is not supported (supported formats: eps, pdf, pgf,...

        This is an error during yolo training.

Solution 1: (due to the fact that the pillow library is not installed)

         After activating the environment, use the following command to install

pip install pillow -i https://pypi.tuna.tsinghua.edu.cn/simple

Solution 2: (because the version of the pillow library is too low)

        Uninstall the library first

pip uninstall pillow

        Install again (this time the installation is the latest) 

pip install pillow -i https://pypi.tuna.tsinghua.edu.cn/simple

Solution 3: (due to the low version of the matplotlib library)

        Uninstall the library first

pip uninstall matplotlib 

        reinstall

pip install matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple

3、Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.

        This is an error during yolo training.        

Solution:

        Add the following two sentences below the code of the import library in the train.py file.

import os
os.environ['KMP_DUPLICATE_LIB_OK']='TRUE'

4、ModuleNotFoundError: No module named 'mkl'

Workaround: (regular pip install doesn't work)

        After activating the environment, install it with the following command.

conda install mkl-service

5、AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'

Solution:

         Click on the penultimate line to enter the environment (at this time, the environment configuration file is changed, and the system will prompt that the current file is not in the project, just choose to persist in the modification).

         Comment out the two lines under the forward function and add the following line

        Right now

return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners)

On the way to school, you and I encourage each other (๑•̀ㅂ•́)و✧  

Guess you like

Origin blog.csdn.net/Albert_yeager/article/details/130663510