A PyTorch implementation of the YOLOX object detection model based on the mmdetection implementation.
Project description
cjm-yolox-pytorch
Install
pip install cjm_yolox_pytorch
How to use
import torch
from cjm_yolox_pytorch.model import MODEL_TYPES, build_model
Select model type
model_type = MODEL_TYPES[0]
model_type
'yolox_tiny'
Build YOLOX model
yolox = build_model(model_type, 19, pretrained=True)
test_inp = torch.randn(1, 3, 256, 256)
with torch.no_grad():
cls_scores, bbox_preds, objectness = yolox(test_inp)
print(f"cls_scores: {[cls_score.shape for cls_score in cls_scores]}")
print(f"bbox_preds: {[bbox_pred.shape for bbox_pred in bbox_preds]}")
print(f"objectness: {[objectness.shape for objectness in objectness]}")
The file ./pretrained_checkpoints/yolox_tiny.pth already exists and overwrite is set to False.
cls_scores: [torch.Size([1, 19, 32, 32]), torch.Size([1, 19, 16, 16]), torch.Size([1, 19, 8, 8])]
bbox_preds: [torch.Size([1, 4, 32, 32]), torch.Size([1, 4, 16, 16]), torch.Size([1, 4, 8, 8])]
objectness: [torch.Size([1, 1, 32, 32]), torch.Size([1, 1, 16, 16]), torch.Size([1, 1, 8, 8])]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cjm-yolox-pytorch-0.0.146.tar.gz
(23.6 kB
view hashes)
Built Distribution
Close
Hashes for cjm-yolox-pytorch-0.0.146.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab1e42333292ecc159a2b88b5f8149500ce403bd32c534a8c80c115f6e92247c |
|
MD5 | 21a4d5fffc1dee381ca4a3a17fa0c4b0 |
|
BLAKE2b-256 | db226027db23b14a2ee991987e5fd8eab85a4608096b3d22887f9373961359b6 |
Close
Hashes for cjm_yolox_pytorch-0.0.146-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa20833c44158265c4a93cd92920dbc1c7b6a045f7b29e1e5a725b8306d3d93d |
|
MD5 | b532c6418f56d6e5e1d3938386a215f6 |
|
BLAKE2b-256 | 85d77ea7243cbe7980de91e78920bf25a38da60c09249b5a00377c2f8186d8c3 |