YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with MegEngine, ONNX, TensorRT, ncnn, and OpenVINO supported. Documentation: https://yolox.readthedocs.io/
Apache License 2.0
9.29k
stars
2.18k
forks
source link
Find bounding box coordinates from checkpoint (best_ckpt.pth.tar) file #1143
I am trying to predict image and trying to find the bounding box coordinates and class name by loading the pretrained model, please help how to proceed to find the bounding box
i tried to find the result in that way, but showing error dic
import torch
model = torch.load('/content/drive/MyDrive/Violence_Gun_detection/YOLOX/YOLOX_outputs/yolox_voc_s/best_ckpt.pth.tar')
dir = 'https://github.com/ultralytics/yolov5/raw/master/data/images/'
imgs = [dir + f for f in ('zidane.jpg', 'bus.jpg')] # batched list of images
results = model(imgs)
results.print()
results.save() # or .show()
print(results.xyxy[0]) # print img1 predictions (pixels)
I am trying to predict image and trying to find the bounding box coordinates and class name by loading the pretrained model, please help how to proceed to find the bounding box
i tried to find the result in that way, but showing error dic