initialize_project.new
logger_config
logger
init_new_project
def init_new_project(project_name: str,
poses_estimations: List[str],
source_software: Literal["DeepLabCut", "SLEAP",
"LightningPose", "NWB", "auto",
"movement"] = "auto",
working_directory: str = ".",
videos: Optional[List[str]] = None,
video_type: str = ".mp4",
fps: Optional[float] = None,
copy_videos: bool = False,
processing_module_key: str = "behavior",
pose_estimation_key: str = "PoseEstimation",
config_kwargs: Optional[dict] = None) -> Tuple[str, dict]
Creates a new VAME project with the given parameters. A VAME project is a directory with the following structure:
- project_name/
- data/
- raw/
- session1.mp4
- session1.nc
- session2.mp4
- session2.nc
- ...
- processed/
- session1_processed.nc
- session2_processed.nc
- ...
- raw/
- model/
- pretrained_model/
- results/
- video1/
- video2/
- ...
- states/
- states.json
- config.yaml
- data/
Parameters
- project_name (
str): Project name. - videos (
List[str]): List of videos paths to be used in the project. E.g. ['./sample_data/Session001.mp4'] - poses_estimations (
List[str]): List of pose estimation files paths to be used in the project. E.g. ['./sample_data/pose estimation/Session001.csv'] - source_software (
Literal["DeepLabCut", "SLEAP", "LightningPose", "NWB", "auto"], optional): Source software used for pose estimation. Defaults to"auto", which lets movement infer the format from the file extension and contents. Pass an explicit value ("DeepLabCut","SLEAP","LightningPose","NWB") to override auto-detection. - working_directory (
str, optional): Working directory. Defaults to '.'. - video_type (
str, optional): Video extension (.mp4 or .avi). Defaults to '.mp4'. - fps (
float, optional): Sampling rate of the videos. If not passed, it will be estimated from the video file. Defaults to None. - copy_videos (
bool, optional): If True, the videos will be copied to the project directory. If False, symbolic links will be created instead. Defaults to False. - processing_module_key (
str, optional): Only used whensource_software="NWB". Name of the NWB processing module that contains the pose estimation container. Defaults to "behavior". - pose_estimation_key (
str, optional): Only used whensource_software="NWB". Name of thendx_pose.PoseEstimationobject inside the processing module. Defaults to "PoseEstimation". - config_kwargs (
Optional[dict], optional): Additional configuration parameters. Defaults to None.
Returns
Tuple[str, dict]: Tuple containing the path to the config file and the config data.