Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Extend sleap-track to allow text and CSV files as input for data_path #1870

@emdavis02

Description

@emdavis02

Original Issue and Original Pull Request:

Allow inference on multiple individual videos via sleap-track #1777, #1784

Problem Description

After having expanded sleap-track to support multiple videos inputs at once, we want to further simplify this process for projects with a large numbers of inputs.

Feature Proposal

  • allow text and csv files as input for data_path
  • text files would simply have a list of input video paths, whereas csv files would enable us to have a column of input file paths and a column of output file paths

Implementation Details

The code will be added to the sleap/nn/inference.py file, editing the processing of data_path and output_path to check for file type.

Documentation for the CLI will be updated to specify how to use this new feature. Specifically, the formatting required of the text and CSV files.

If this formatting is not followed, an error will be raised to avoid misreading of the inputed files.

Additional test cases will be made in test_inference to ensure the new feature has been successfully implemented

Documentation Changes

Changes will be made to the sleap-track section of the documentation

positional arguments:
data_path Path to data to predict on. This can be one of the following:

  • A .slp file containing labeled data.
  • A folder containing multiple video files in supported formats.
  • An individual video file in a supported format.
  • A CSV file with a column of file paths to video files in supported formats; an optional adjacent column can specify output file paths.
  • A text file with a path to a video file on each line.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions