Metadata-Version: 2.1
Name: df2d
Version: 0.13
Summary: 2D pose estimation pipeline for tethered Drosophila.
Home-page: https://github.com/semihgunel/Drosophila2DPose
Author: Semih Gunel
Author-email: gunelsemih@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Description-Content-Type: text/markdown

# Drosophila 2D Pose

- Load the model.
```python
from model import Drosophila2DPose
from parser import create_parser

checkpoint_path = '/home/user/Desktop/DeepFly3D/weights/sh8_deepfly.tar'
args = create_parser().parse_args('')
model = Drosophila2DPose(checkpoint_path=checkpoint_path, **args.__dict__).cuda()
```

- Load the data.
```python
from inference import path2inp
from dataset import Drosophila2Dataset
from torch.utils.data import DataLoader

image_path = '/home/user/Desktop/DeepFly3D/data/test/'
inp = path2inp(image_path) # extract list of images under the folder
dat = DataLoader(Drosophila2Dataset(inp), batch_size=8)
```

- Do the inference.
```python
from inference import inference
points2d = inference(model, dat)
```

