When running detect.py for inference testing after yolov5 training is complete, this error occurs:

The specific error is as follows:

Solution:
1. Click the error reporting method below to enter:

2. Modify to the following code:

Done!
When running detect.py for inference testing after yolov5 training is complete, this error occurs:

The specific error is as follows:

Solution:
1. Click the error reporting method below to enter:

2. Modify to the following code:

Done!