Megvii-BaseDetection / Megvii-BaseDetection/YOLOX
Find bounding box coordinates from checkpoint (best_ckpt.pth.tar) file
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the checkpoint-loading and model-call lines in the supplied Python snippet, then compare them with YOLOX's documented inference entry points. Verify how best_ckpt.pth.tar is loaded and how predictions are exposed; done means an image produces bounding-box coordinates and class names without the shown error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- computer-vision, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100