Skip to main content

Semi-automatic Pipeline for Markerless Pose Estimation and Behavior classification of mouse.

Project description

SBA

Untility functions for interaction classifcation. The module provides functions for pre-SIMBA and post-SIMBA processing.

Installation

pip install SBAUtil

Tutorial

import SBA

Initalize the configuration file:

SBA.initConfig('./',projectName = "newProject", experimenter = "Yiyang")

dynamic cut

SIMBA gives error if the h5file input from DLC contains a portion where there is only one mouse. SBA.batch_dynamic_cropVideo will

  1. dynamically crop out this portion based on the given h5file from DLC.
  2. modify the original DLC h5 file to match the extracted video.
  3. The new videos and new h5files can then be used for SIMBA analysis
SBA.batch_dynamic_cropVideo(config_path,videos,h5files,videoType="avi")

videos: The path to directory of the videos.

h5files: The path to the directory of the DLC h5 outputs.

Post SIMBA processing

finalizeSimBaOutput does the following:

  1. Simplify the final output from SIMBA.
  2. Modify the frame number field so that it matches the original video.
SBA.finalizeSimBaOutput(config, simbaFiles, classifier ,destDir = None)

config: path to the SBA configuration file.

simbaFiles: path to the SIMBA output directory. It's by default in project_folder/csv/machine_results.

classifier: list of strings containing the classifier names. For example, ["isInteraction"] or ["Unilateral", "Reciprocal", "Passive"]. Make sure the spelling matches the names defined in the SIMBA model.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SBAUtil-0.0.7.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

SBAUtil-0.0.7-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file SBAUtil-0.0.7.tar.gz.

File metadata

  • Download URL: SBAUtil-0.0.7.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.12

File hashes

Hashes for SBAUtil-0.0.7.tar.gz
Algorithm Hash digest
SHA256 3fd6c5fa0c4784b222ea3ab87262de94132dd4d64f7977007997203757bfe30e
MD5 bc91b423b7ffd6bf31fe9acf934f89c4
BLAKE2b-256 d27455cacbc0e1197ae4100f26db2104a822fff4d46b7c75a45e14c79811b903

See more details on using hashes here.

File details

Details for the file SBAUtil-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: SBAUtil-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.12

File hashes

Hashes for SBAUtil-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 28539e1203c8765e0d924fc5479642b54b15710ed16b6fd2ed97fe29ca8bd7de
MD5 07282b9c64aa23da6d687f6dab5c29b0
BLAKE2b-256 7d94f74288029e79b593b521587c2d13183daa8cf3501ae4a099601b751d2872

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page