Skip to content

Grigorii777/KeyframeSimplifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KeyframeSimplifier

Tool for simplification CVAT keyframes

Dev installation UV

MacOS

brew install uv
uv --version

Windows (Power shell)

powershell -ExecutionPolicy Bypass -NoProfile -Command "irm https://astral.sh/uv/install.ps1 | iex"
uv --version

Dev installation

uv venv
uv sync
uv pip install -e ".[dev]"

Help

uv run cvat-tool --help

Run tests

uv run pytest -v -s

Run visualization example

uv run python src/cvat_tool/iou/matplot.py

Advanced Usage Examples

IoU-based simplification (Main functionality)

# Default: IoU threshold 0.9
uv run cvat-tool --job-id 3529725

# Custom IoU threshold
uv run cvat-tool --job-id 3529725 --iou-threshold 0.7

# Restore from backup
uv run cvat-tool --job-id 3529725 --undo

Size Check (Analysis tool)

# Check object size consistency across frames
# Displays all frames where object size differs from the first keyframe
uv run cvat-tool --job-id 3529725 --size-check

This tool analyzes each tracked object and:

  • Records the reference size from the first keyframe
  • Compares all subsequent frames against this reference on each axis (X, Y, Z)
  • Displays a table showing all frames where size is not equal to the reference

Field-based simplification (Additional, NOT tested with IoU)

# Auto-calculated fields (1% of max distances)
uv run cvat-tool --job-id 3529725 --iou-threshold 2.0 --auto-percent 1.0

# Custom auto-percent (5%)
uv run cvat-tool --job-id 3529725 --iou-threshold 2.0 --auto-percent 5.0

# Manual field configuration
uv run cvat-tool --job-id 3529725 --iou-threshold 2.0 --field position,5.1,l2 --field rotation,0.0,l_inf

Note: When using field-based simplification, set --iou-threshold 2.0 to effectively disable IoU filtering.

About

Tool for simplification keyframes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages