Metadata-Version: 2.1
Name: cjm-yolox-pytorch
Version: 0.0.24
Summary: A PyTorch implementation of the YOLOX object detection model based on the mmdetection implementation.
Home-page: https://github.com/cj-mills/cjm-yolox-pytorch
Author: cj-mills
Author-email: millscj.mills2@gmail.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python torch
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE

# cjm-yolox-pytorch

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Install

``` sh
pip install cjm_yolox_pytorch
```

## How to use

``` python
from cjm_yolox_pytorch.model import MODEL_TYPES, build_model
```

**Select model type**

``` python
model_type = MODEL_TYPES[0]
model_type
```

    'yolox_tiny'

**Build YOLOX model**

``` python
import torch

yolox = build_model(model_type, 19)

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]}")
```

    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])]
