Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 738 Bytes

README.md

File metadata and controls

28 lines (23 loc) · 738 Bytes

Drosophila 2D Pose

  • Load the model.
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.
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.
from inference import inference
points2d = inference(model, dat)