forked from LINCellularNeuroscience/VAME
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from EthoML/data-ingestion
adopt movement and xarray for ingestion
- Loading branch information
Showing
26 changed files
with
887 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
branches: | ||
- main | ||
- dev | ||
- data-ingestion | ||
|
||
|
||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# VAME Pipeline example" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from vame.pipeline import VAMEPipeline\n", | ||
"from vame.util.sample_data import download_sample_data" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# Set up your working directory and project name\n", | ||
"working_directory = '.'\n", | ||
"project_name = 'pipeline_example'\n", | ||
"\n", | ||
"# You can run VAME with data from different sources\n", | ||
"source_software = \"SLEAP\" # \"DeepLabCut\", \"SLEAP\" or \"LightningPose\"\n", | ||
"\n", | ||
"# Download sample data\n", | ||
"ps = download_sample_data(source_software)\n", | ||
"videos = [ps[\"video\"]]\n", | ||
"poses_estimations = [ps[\"poses\"]]\n", | ||
"\n", | ||
"# Instantiate the pipeline\n", | ||
"# this will create a VAME project and prepare the data\n", | ||
"pipeline = VAMEPipeline(\n", | ||
" working_directory=working_directory,\n", | ||
" project_name=project_name,\n", | ||
" videos=videos,\n", | ||
" poses_estimations=poses_estimations,\n", | ||
" source_software=source_software,\n", | ||
")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# Before running the pipeline, you can check the imported datasets\n", | ||
"ds = pipeline.get_raw_datasets()\n", | ||
"ds" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# Run the pipeline\n", | ||
"pipeline.run_pipeline()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# If for some reason you need to stop the pipeline, you can resume it later from any step\n", | ||
"# Example: resuming from community clustering step\n", | ||
"pipeline.run_pipeline(from_step=6)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "vame", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.9" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.