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.
Error occurred while building the model: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
TypeError: 'NoneType' object is not callable
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.141.tar.gz
(22.3 kB
view hashes)
Built Distribution
Close
Hashes for cjm-yolox-pytorch-0.0.141.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b89df64ea5d65911685f52e0b7c37f19b280ebb68761450b61c57137f6e03a3 |
|
MD5 | 9deb8ca4fb6fb5f3b08f253ea46fd107 |
|
BLAKE2b-256 | 94acbcd3bac9aeb388e118f7aa48f5f8c927b738b20b588e5f858930bc3da8e0 |
Close
Hashes for cjm_yolox_pytorch-0.0.141-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c211301776e8c12669fc7260faf3490c8e4d70a2f7b9d34753a3d0c9746eded1 |
|
MD5 | 3fd2c592f203fa5f915bcf3a80661900 |
|
BLAKE2b-256 | dfb90ab95c58018bf90920c58229e7fe60664e086bd8a52455b29aeb76cfcff9 |