YOLO-World icon indicating copy to clipboard operation
YOLO-World copied to clipboard

Syntax Error-fix

Open swalehmwadime opened this issue 1 year ago • 1 comments

Syntax Error 1:

import supervision as a SV statement at the beginning of the script. There is no module named supervision in the standard Python libraries, nor is it imported from elsewhere in the script. Potential Fix: Remove or replace this import statement with the correct module import.

Syntax Error 2:

def inference_detector(runner, image_path, texts, max_dets, score_thr, output_dir, use_amp=False, show=False): function definition. The use_amp and show parameters have default values but are listed after parameters without default values. Potential Fix: Rearrange the function parameters so that those with default values come after those without default values.

Syntax Error 3:

cv2.imshow(image) and cv2.destroyAllWindows() inside the if show: block. The cv2.imshow() function requires a window name as the first argument. Potential Fix: Provide a window name parameter to cv2.imshow().

swalehmwadime avatar Feb 23 '24 14:02 swalehmwadime

supervision is library you need to install and you can install via "pip install supervision"

onuralpszr avatar Feb 23 '24 14:02 onuralpszr

this PR should not be merged, it has some errors. @wondervictor

For example, it delete sv, but sv is still used.

It defines a none var, and immediately use it.

This makes image_demo.py wrong.

taofuyu avatar Mar 13 '24 02:03 taofuyu

Hi @taofuyu, thanks and I'll check it.

wondervictor avatar Mar 13 '24 03:03 wondervictor