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.9.tar.gz (1.8 MB 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.9-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for SBAUtil-0.0.9.tar.gz
Algorithm Hash digest
SHA256 0c23536e73f2648cac3dd227a6fa67305629f8720e56a9eb75f7cf008c29c646
MD5 577017c6285dcdf47cd4310d7a3f5421
BLAKE2b-256 bc419480a08589809f6fd3eaec3d70763b7732a49f8f1074921ecf9a083a5a38

See more details on using hashes here.

File details

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

File metadata

  • Download URL: SBAUtil-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 1.8 MB
  • 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 7d9df7a1724783fb92283f97c1f694a13832415234f2a28f9bbb119998a5e4a2
MD5 9374ba984571adba4dd3a4ba076cb018
BLAKE2b-256 f38796b644db095caac084b344b45caee321c4d5b0c12a538171df8e7d785def

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