YOLOV8最新版本detect图片,但是结果上没有锚框,请教一下大家。使用之前版本的v8没有这种问题的,现在直接git下来最新的就这样子了
我使用的代码如下
from ultralytics import YOLO
model = YOLO("yolov8s.pt") # load a pretrained model (recommended for training)
# Use the model
model.predict(source='https://media.roboflow.com/notebooks/examples/dog.jpeg')
结果只有这样子
我已经开启了detect里面的大部分设置了,能够得到label,执行后终端也能显示识别出了几个东西,但是就是不显示
# Prediction settings --------------------------------------------------------------------------------------------------
source: # (str, optional) source directory for images or videos
show: True # (bool) show results if possible
save_txt: True # (bool) save results as .txt file
save_conf: True # (bool) save results with confidence scores
save_crop: True # (bool) save cropped images with results
show_labels: True # (bool) show object labels in plots
show_conf: True # (bool) show object confidence scores in plots
vid_stride: 1 # (int) video frame-rate stride
stream_buffer: False # (bool) buffer all streaming frames (True) or return the most recent frame (False)
line_width: # (int, optional) line width of the bounding boxes, auto if missing
visualize: True # (bool) visualize model features
augment: False # (bool) apply image augmentation to prediction sources
agnostic_nms: False # (bool) class-agnostic NMS
classes: # (int | list[int], optional) filter results by class, i.e. classes=0, or classes=[0,2,3]
retina_masks: False # (bool) use high-resolution segmentation masks
boxes: True # (bool) Show boxes in segmentation predictions
image 1/1 /content/drive/MyDrive/dog.jpeg: 640x384 1 person, 1 car, 1 dog, 1 handbag, 31409.6ms
Speed: 6.2ms preprocess, 31409.6ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 384)
Results saved to /content/drive/My Drive/ultralytics/runs/detect/predict3
1 label saved to /content/drive/My Drive/ultralytics/runs/detect/predict3/labels