Metadata-Version: 2.1
Name: dethub
Version: 0.1.1
Summary: DetHub: Object Detection Model Hub
Home-page: https://github.com/goksenin-uav/dethub
Author: kadirnar
License: MIT
Keywords: machine-learning,deep-learning,ml,pytorch,vision,loss,image-classification,video-classification
Classifier: Development Status :: 5 - Production/Stable
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Education
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: tests
Provides-Extra: dev
License-File: LICENSE

<div align="center">
<h1>
DetHub: Object Detection Model Hub
</h1>
<img src="https://github.com/goksenin-uav/dethub/blob/6b2c5dfee1b977cdb4cc6369c70862719262738d/doc/tensorflow.jpg" alt="Torchvision" width="800">
</div>

### Installation
```
pip install dethub
```
### Yolov5 Object Prediction and Visualization
```python
from dethub.model import Yolov5
from dethub.visualize import show

detection_model = Yolov5(model_path= "yolov5s.pt", device="cpu", confidence_threshold=0.5, image_size=640)
show("highway1.jpg", detection_model)
```
<img src="https://github.com/goksenin-uav/dethub/blob/6b2c5dfee1b977cdb4cc6369c70862719262738d/doc/yolov5.jpg" alt="Yolov5" width="800">

### Torchvision Object Prediction and Visualization
```python
from dethub.model import TorchVision
from dethub.visualize import show

detection_model = TorchVision(model_path= "dethub/models/torchvision/fasterrcnn_resnet50_fpn.pth", device="cpu", confidence_threshold=0.5, image_size=640)
show("highway1.jpg", detection_model)
```
<img src="https://github.com/goksenin-uav/dethub/blob/6b2c5dfee1b977cdb4cc6369c70862719262738d/doc/torchvision.jpg" alt="Torchvision" width="800">

### TensorflowHub Object Prediction and Visualization
```python
from dethub.model import TensorflowHub
from dethub.visualize import show

detection_model = TensorflowHub(model_path= "https://tfhub.dev/tensorflow/efficientdet/d3/1", device="cpu", confidence_threshold=0.5, image_size=640)
show("highway1.jpg", detection_model)
```
<img src="https://github.com/goksenin-uav/dethub/blob/6b2c5dfee1b977cdb4cc6369c70862719262738d/doc/tensorflow.jpg" alt="TfHub" width="800">

### Contributing
Before opening a PR:
- Reformat with black and isort:
```bash
black . --config pyproject.toml
isort .
```
References:
- [SAHI](https://github.com/obss/sahi)
- [YOLOX](https://github.com/Megvii-BaseDetection/YOLOX)
- [Mcvarer](https://github.com/mcvarer/coco_toolkit)
