Skip to content

KTaskn/densetrack-docker-python3.9

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Docker image for using Improved Trajectory by densetrack

This docker image is for using densetrack with Python 3.9 and OpenCV 3.4 . With this image, densetrack is ready to use.

import numpy as np
import densetrack

# You need to install Pillow if you want to open images by PIL
# >> pip install Pillow
from PIL import Image

TRACKS_RET_FIELDS = ['frame_num', 'mean_x', 'mean_y', 'var_x', 'var_y', 'length',
            'scale', 'x_pos', 'y_pos', 't_pos', 'coords', 'trajectory',
            'hog', 'hof', 'mbh_x', 'mbh_y']
F = 16

frames = np.stack([Image.open(f"{num:03}.jpg").convert("L") for num in range(F)])
tracks = [dict(zip(TRACKS_RET_FIELDS, track)) for track in densetrack.densetrack(frames, adjust_camera=False, track_length=F - 1)]

For more information see the following links if you want to know Improved trajectories or Dense Trajectories

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published