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.8.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.8-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: SBAUtil-0.0.8.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.8.tar.gz
Algorithm Hash digest
SHA256 e89d9447dc30f6acd697cda7b264e4e58c25638b7b4186c756313a9e14c8ca35
MD5 4209e874af5b517df6de60c7d540b6ab
BLAKE2b-256 ed727685caa8bc96fae05987c1dbe297b04ce365b5ccbd6243b6ef99e79b4d2b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: SBAUtil-0.0.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 35793ab4c019167b5a125aa2642dc0e10d84e1b3c82742c68054a837f43e3368
MD5 733ca5ba1efee46b62588b7e3ccf6545
BLAKE2b-256 90d717766500c127a78f7248b36fa1dd82ab92897e431c41159f925dbe30e2a7

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