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.1.0.tar.gz (351.5 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.1.0-py3-none-any.whl (367.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for SBAUtil-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bae417d933271adb5c515465f3c138966556dda651f4a3ae91ff0f40960475dc
MD5 2157d6e7e0fff33f6a6844b728cdd23c
BLAKE2b-256 d35492eb58550d386f11ab7fa3c7cd70ee244d4930ca5288ded9551691b19a8f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: SBAUtil-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 367.4 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1fc264d6929424aa063c9c4e2bbd9d938b2b5e96059d91d01904bb9ffe971cde
MD5 26ee9b1843717847bc8d8a35d0b3db02
BLAKE2b-256 e0e2637f6fe857fdd5e3c3f10547b94fa40ead3661902371e14ee048bd6ea1f5

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