Skip to content

Commit 47dccb5

Browse files
Ensure pipeline description does not omit anything from main full pipeline doc (#110)
* Incorporate image mistakenly ignored * Clean up pipeline docs against reference single document * Clarify section names under pipeline tab * Fix outdated CVAT reference links * Correct ethogram link --------- Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
1 parent 6ae16d4 commit 47dccb5

File tree

11 files changed

+70
-205
lines changed

11 files changed

+70
-205
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ _hugging_face
199199
_hugging_face
200200
_hugging_face/*
201201

202-
# Allow CSV files intended to be in docs, ignore one not to include
203-
!docs/**/*.csv
202+
# Allow tracking of intended files in docs, ignore one not to include
203+
!docs/**
204204
docs/methodology_comparison/kabr_dataset/data/consolidated_metadata.csv
205205

206206
helper_scripts/mini-scenes

docs/images/im_mini-scenes.jpg

464 KB
Loading

docs/pipeline.md

Lines changed: 0 additions & 132 deletions
This file was deleted.

docs/pipeline/analysis.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ Time budget analysis shows how animals allocate their time across different beha
1515
<img src="../images/grevys.png" alt="grevys" style="width: 48%;">
1616
</div>
1717

18-
**Figure:** Example flight path and video clip from KABR dataset: 2 male Grevy's zebras observed for 10 minutes on 01/18/23.
18+
**Figure 1:** Example flight path and video clip from KABR dataset: two male Grevy's zebras observed for 10 minutes on 01/18/23.
1919

2020
![Time Budget](../images/timebudget.png)
2121

22-
**Figure:** Overall time budget for duration of 10 minute observation
22+
**Figure 2:** Overall time budget for duration of 10 minute observation.
2323

2424
![Timeline 1](../images/timeline0.png)
2525
![Timeline 2](../images/timeline1.png)
2626

27-
**Figure:** Gantt chart for each zebra (3 minute duration)
27+
**Figure 3:** Gantt chart for each zebra (3 minute duration).
2828

2929
### Implementation
3030

@@ -50,29 +50,29 @@ See the [behavior transitions notebook](../case_studies/2_zebra_transition/behav
5050

5151
Explore real-world applications in the case studies directory:
5252

53-
- **[Grevy's Landscape Analysis](../case_studies/1_grevys_landscape/grevys_landscape.ipynb)** - Landscape-scale behavioral analysis
54-
- **[Mixed Species Social](../case_studies/3_mixed_species_social/mixed_species_overlap.ipynb)** - Multi-species interaction analysis
55-
- **[Zebra Behavior Transitions](../case_studies/2_zebra_transition/behaviortransitionsheatmap.ipynb)** - Behavioral transition patterns
53+
- **[Grevy's Landscape Analysis](../case_studies/1_grevys_landscape/grevys_landscape.ipynb)** - Landscape-scale behavioral analysis.
54+
- **[Mixed Species Social](../case_studies/3_mixed_species_social/mixed_species_overlap.ipynb)** - Multi-species interaction analysis.
55+
- **[Zebra Behavior Transitions](../case_studies/2_zebra_transition/behaviortransitionsheatmap.ipynb)** - Behavioral transition patterns.
5656

5757
## Key Metrics Generated
5858

5959
The analysis pipeline can generate several key ecological metrics:
6060

61-
1. **Time Budgets** - Proportion of time spent in each behavioral category
62-
2. **Behavioral Transitions** - Probability matrices of behavior changes
63-
3. **Social Interactions** - Proximity and interaction frequency between individuals
64-
4. **Habitat Associations** - Relationship between behaviors and spatial locations
65-
5. **Group Composition Dynamics** - Changes in group structure over time
61+
1. **Time Budgets** - Proportion of time spent in each behavioral category.
62+
2. **Behavioral Transitions** - Probability matrices of behavior changes.
63+
3. **Social Interactions** - Proximity and interaction frequency between individuals.
64+
4. **Habitat Associations** - Relationship between behaviors and spatial locations.
65+
5. **Group Composition Dynamics** - Changes in group structure over time.
6666

6767
## Visualization Tools
6868

6969
The framework includes tools for creating publication-ready visualizations:
7070

71-
- Gantt charts for individual behavioral timelines
72-
- Heat maps for behavioral transition probabilities
73-
- Spatial plots for habitat use patterns
74-
- Social network diagrams for interaction patterns
75-
- Time series plots for behavioral trends
71+
- Gantt charts for individual behavioral timelines.
72+
- Heat maps for behavioral transition probabilities.
73+
- Spatial plots for habitat use patterns.
74+
- Social network diagrams for interaction patterns.
75+
- Time series plots for behavioral trends.
7676

7777
## Next Steps
7878

docs/pipeline/behavior-labeling.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ miniscene2behavior --config config.yml --checkpoint checkpoint_epoch_00075.pyth
4545

4646
## Resources
4747

48-
- [Pre-trained KABR model](https://huggingface.co/imageomics/x3d-kabr-kinetics) on Hugging Face
49-
- [Ethogram definitions](https://github.com/Imageomics/kabr-tools/tree/main/CVAT/ethogram) - Behavior classification system used for zebra videos
50-
- [Example annotated outputs](https://huggingface.co/imageomics/x3d-kabr-kinetics/tree/main/data/mini_scene_behavior_annotations) on Hugging Face
48+
- [Pre-trained KABR model](https://huggingface.co/imageomics/x3d-kabr-kinetics) on Hugging Face.
49+
- [Ethogram definitions](https://github.com/Imageomics/kabr-tools/tree/main/ethogram) - Behavior classification system used for zebra videos.
50+
- [Example annotated outputs](https://huggingface.co/imageomics/x3d-kabr-kinetics/tree/main/data/mini_scene_behavior_annotations) on Hugging Face.
5151

5252
## Tool Reference
5353

@@ -58,12 +58,12 @@ Source: [src/kabr_tools/miniscene2behavior.py](https://github.com/Imageomics/kab
5858
Apply machine learning models to classify animal behaviors from mini-scene videos.
5959

6060
**Parameters:**
61-
- `--hub`: Hugging Face hub repository containing model files
62-
- `--config`: Path to configuration file (local or from hub)
63-
- `--checkpoint`: Path to model checkpoint file
64-
- `--gpu_num`: Number of GPUs to use (0 for CPU)
65-
- `--miniscene`: Path to mini-scene videos directory
66-
- `--output`: Path for output CSV file (optional)
61+
- `--hub`: Hugging Face hub repository containing model files.
62+
- `--config`: Path to configuration file (local or from hub).
63+
- `--checkpoint`: Path to model checkpoint file.
64+
- `--gpu_num`: Number of GPUs to use (0 for CPU).
65+
- `--miniscene`: Path to mini-scene videos directory.
66+
- `--output`: Path for output CSV file (optional).
6767

6868
## Next Steps
6969

docs/pipeline/data-collection.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@ The drone videos for the [KABR dataset](https://huggingface.co/datasets/imageomi
1212

1313
We collaborated with expert ecologists to ensure minimal disturbance to the animals. Our approach included:
1414

15-
- **Launch Position**: Approximately 200 meters horizontally from the animals
16-
- **Initial Altitude**: 30-40 meters above ground
17-
- **Approach Strategy**: Gradually approach the herd from the side by reducing altitude and horizontal distance
18-
- **Monitoring**: Continuously monitor animals for signs of vigilance
15+
- **Launch Position**: Approximately 200 meters horizontally from the animals.
16+
- **Initial Altitude**: 30-40 meters above ground.
17+
- **Approach Strategy**: Gradually approach the herd from the side by reducing altitude and horizontal distance.
18+
- **Monitoring**: Continuously monitor animals for signs of vigilance.
1919

2020
!!! warning "Species-Specific Considerations"
2121
The vigilance exhibited by wildlife varies widely by species, habitat, sex, and the level to which animals may be habituated to anthropogenic noise. We recommend that you tailor your approach to your particular species and setting.
2222

2323
## Equipment Used
2424

25-
- **Drone**: DJI Air 2S
26-
- **Flight Mode**: Manual control
27-
- **Recording Settings**: Standard video recording at highest available resolution
25+
- **Drone**: DJI Air 2S.
26+
- **Flight Mode**: Manual control.
27+
- **Recording Settings**: Standard video recording at highest available resolution.
2828

2929
## Data Collection Workflow
3030

31-
1. **Site Assessment**: Scout the area and identify animal locations
32-
2. **Equipment Setup**: Prepare drone and check battery levels
33-
3. **Launch**: Deploy drone at safe distance from animals
34-
4. **Approach**: Gradually move closer while monitoring animal behavior
35-
5. **Recording**: Capture video footage of natural behaviors
36-
6. **Data Management**: Safely store and backup all collected footage
31+
1. **Site Assessment**: Scout the area and identify animal locations.
32+
2. **Equipment Setup**: Prepare drone and check battery levels.
33+
3. **Launch**: Deploy drone at safe distance from animals.
34+
4. **Approach**: Gradually move closer while monitoring animal behavior.
35+
5. **Recording**: Capture video footage of natural behaviors.
36+
6. **Data Management**: Safely store and backup all collected footage.
3737

3838
## Publications
3939

docs/pipeline/optional-steps.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -51,56 +51,56 @@ Several utility scripts are available in the `helper_scripts` directory:
5151

5252
Scripts for batch processing and annotation of mini-scenes:
5353

54-
- **[launch_job.py](../../helper_scripts/annotate_mini_scenes/launch_job.py)** - Job launcher for batch processing
55-
- **[run.sh](../../helper_scripts/annotate_mini_scenes/run.sh)** - Shell script for running annotation tasks
54+
- **[launch_job.py](../../helper_scripts/annotate_mini_scenes/launch_job.py)** - Job launcher for batch processing.
55+
- **[run.sh](../../helper_scripts/annotate_mini_scenes/run.sh)** - Shell script for running annotation tasks.
5656

5757
See [README](../../helper_scripts/annotate_mini_scenes/README.md) for detailed usage instructions.
5858

5959
### Video Processing Utilities
6060

61-
- **[downgrade.sh](../../helper_scripts/downgrade.sh)** - Reduce video file sizes for CVAT compatibility
62-
- **[rename.sh](../../helper_scripts/rename.sh)** - Batch rename files with consistent naming conventions
61+
- **[downgrade.sh](../../helper_scripts/downgrade.sh)** - Reduce video file sizes for CVAT compatibility.
62+
- **[rename.sh](../../helper_scripts/rename.sh)** - Batch rename files with consistent naming conventions.
6363

6464
## Advanced Configuration
6565

6666
### Custom Model Training
6767

6868
For training custom behavior recognition models, you'll need:
6969

70-
1. **Annotated mini-scenes** from your specific species/environment
71-
2. **Behavior ethogram** defining your classification categories
72-
3. **Training configuration** adapted to your dataset size and complexity
70+
1. **Annotated mini-scenes** from your specific species/environment.
71+
2. **Behavior ethogram** defining your classification categories.
72+
3. **Training configuration** adapted to your dataset size and complexity.
7373

7474
### GPU Requirements
7575

7676
Most tools support both CPU and GPU processing:
7777

78-
- **CPU mode**: Slower but works on any system
79-
- **GPU mode**: Significantly faster, recommended for large datasets
80-
- **Multi-GPU**: Supported for distributed processing of large video collections
78+
- **CPU mode**: Slower but works on any system.
79+
- **GPU mode**: Significantly faster, recommended for large datasets.
80+
- **Multi-GPU**: Supported for distributed processing of large video collections.
8181

8282
### Batch Processing
8383

8484
For processing large video collections:
8585

86-
1. Use the provided shell scripts for batch operations
87-
2. Consider using job scheduling systems (SLURM, PBS) for cluster environments
88-
3. Monitor disk space requirements for intermediate files
86+
1. Use the provided shell scripts for batch operations.
87+
2. Consider using job scheduling systems (SLURM, PBS) for cluster environments.
88+
3. Monitor disk space requirements for intermediate files.
8989

9090
## Customization Options
9191

9292
The modular design allows for customization at multiple levels:
9393

94-
- **Detection models**: Swap YOLO versions or use custom trained models
95-
- **Tracking algorithms**: Modify tracking parameters for different scenarios
96-
- **Behavior models**: Train species-specific or behavior-specific classifiers
97-
- **Analysis pipelines**: Adapt visualization and metrics to research questions
94+
- **Detection models**: Swap YOLO versions or use custom trained models.
95+
- **Tracking algorithms**: Modify tracking parameters for different scenarios.
96+
- **Behavior models**: Train species-specific or behavior-specific classifiers.
97+
- **Analysis pipelines**: Adapt visualization and metrics to research questions.
9898

9999
## Performance Optimization
100100

101101
Tips for optimizing performance:
102102

103-
- Use appropriate video resolution for your analysis needs
104-
- Batch process multiple videos simultaneously when possible
105-
- Utilize GPU acceleration for model inference
106-
- Consider video compression for storage efficiency
103+
- Use appropriate video resolution for your analysis needs.
104+
- Batch process multiple videos simultaneously when possible.
105+
- Utilize GPU acceleration for model inference.
106+
- Consider video compression for storage efficiency.

docs/pipeline/overview.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ Generation of ecological insights including time budgets, behavioral transitions
2222

2323
## Key Features
2424

25-
- **Modular Design**: Each step can be adapted and customized for different species and study systems
26-
- **Multiple Detection Options**: Support for both manual annotation and automated YOLO-based detection
27-
- **Machine Learning Integration**: Pre-trained models available with support for custom model training
28-
- **Comprehensive Analytics**: Generate multiple types of ecological metrics and visualizations
25+
- **Modular Design**: Each step can be adapted and customized for different species and study systems.
26+
- **Multiple Detection Options**: Support for both manual annotation and automated YOLO-based detection.
27+
- **Machine Learning Integration**: Pre-trained models available with support for custom model training.
28+
- **Comprehensive Analytics**: Generate multiple types of ecological metrics and visualizations.
2929

3030
## Getting Started
3131

0 commit comments

Comments
 (0)