Annotating and Training
- Start a Desktop session in OnDemand
- In the desktop terminal, run:
- Once the SLEAP UI opens, click File > Open Project… and open the file
/data/groups/wheelenj/mosquitoes/L1_L2_L4.labels.v001.slp - Might take a bit to load…
- Add new videos via File > Add Videos… and select a new MP4
- Check grayscale, then click Import
- Click the Videos tab in the right-side pane
- Double click the video you want to annotate
- Click the Labeling Suggestions tab
- In Generate Suggestions, choose Method: Sample; Samples Per Video: 20, Sampling method: stride
- Change Target to current video
- Click Generate Suggestions
- Blue empty boxes will show up in the video nav bar
- Click a blue suggestion. If there’s a mosquito:
- Click the Instance tab
- Click New Instance
- Move the nodes to annotate
- Examples (not to scale)
- Press the space bar to move to the next suggested frame
module load sleap/1.4.1
sleap-labelL1
L3
Below are old notes…ignore for now.
Commands
# from BOSE
rsync -Ppvrz wheelenj@wheeler.nas.uwec.edu:/volume1/WheelerLab_data/InVision/20250616* .
# from desktop session terminal
module load sleap/1.4.1
sleap-labelFile > Open Project… /data/groups/wheelenj/mosquitoes/L1_L2_L4.labels.v001.slp
File > Add Videos… /data/groups/wheelenj/mosquitoes/20250616a01controlard_20250616_140037.24568709/000000.mp4
Predict > Run Inference…
Save configuration files… `/data/groups/wheelenj/mosquitoes/models/
inference-script.shjobs.yamltrain-script.sh
#!/bin/bash
sleap-track /data/groups/wheelenj/mosquitoes/L1_L2_L4.labels.v001.slp --video.index 26 --frames 0,-2331 -m /data/groups/wheelenj/mosquitoes/models/250603_091255.single_instance.n=171/training_config.json --batch_size 4 --tracking.tracker none -o L1_L2_L4.labels.v001.slp.predictions.slp --verbosity json --no-empty-framesinference:
- data_path: L1_L2_L4.labels.v001.slp
models:
- /data/groups/wheelenj/mosquitoes/models/250603_091255.single_instance.n=171/training_config.json
only_suggested_frames: false
output_path: L1_L2_L4.labels.v001.slp.predictions.slp
tracking:
tracking.tracker: none
type: video
training: []#!/bin/bashInference processed at ~22 FPS
Terminal STDOUT:
In general very good performance with one consistent outlier/error:
Resource usage:
Now to try running from command line instead of GUI:
#!/bin/bash
sleap-track {input_data.mp4} -m /data/groups/wheelenj/mosquitoes/models/250603_091255.single_instance.n=171/training_config.json --batch_size 4 --tracking.tracker none --verbosity json --no-empty-framessleap-track /data/groups/wheelenj/mosquitoes/20250616a01cueard_20250616_140456.24568709/000000.mp4 -m /data/groups/wheelenj/mosquitoes/models/250603_091255.single_instance.n=171/training_config.json --batch_size 4 --tracking.tracker none --verbosity json --no-empty-frames
Processed at ~24 FPS
Decent performance with some outliers
This produces: /data/groups/wheelenj/mosquitoes/20250616a01cueard_20250616_140456.24568709/000000.mp4.predictions.slp
To get the CSV, use sleap-convert --format analysis.csv -o 000000.predictions.analysis.csv 000000.mp4.predictions.slp