Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Feature Request: Replace Albumentations with torchvision.transforms.v2 for PyTorch pose estimation

Aberta
#3,240 1 comentário 0 reações 2 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

@deruyter92 já está trabalhando nisso.

Desde 13/3/2026.

  • #3148 de @kimmyjuarez — aberto

Avaliação

Esta issue ainda não foi avaliada.

Descrição

pytorch

Is your feature request related to a problem? Please describe.

Albumentations is an external dependency that has slowed down its development (last major release 1.4.3 in late 2023).

Describe the solution you'd like

Replace the current Albumentations-based augmentation system in the PyTorch pose estimation module (deeplabcut/pose_estimation_pytorch/data/transforms.py) with torchvision.transforms.v2.
Benefits:

  • Dependency reduction: Fewer external dependencies
  • Active development: torchvision.transforms.v2 is actively maintained
  • Better integration: Native support for tv_tensors.KeyPoints, tv_tensors.BoundingBoxes
  • Performance: Optimized for PyTorch with potential GPU acceleration

Describe alternatives you've considered

  1. Keep Albumentations: Continue using it, but this relies on an external library with slower development
  2. Kornia: Another option for differentiable augmentations, but less focused on standard image transforms
  3. Custom implementation: Implement all transforms from scratch (too much work)

Additional context

Current implementation uses ~15+ Albumentations transforms:

  • Resize, LongestMaxSize, HorizontalFlip, Affine, PadIfNeeded
  • Equalize, MotionBlur, GaussNoise, CoarseDropout, ElasticTransform
  • Custom transforms: HFlip (keypoint-aware), KeypointAwareCrop, KeepAspectRatioResize, etc.
    Relevant files:
  • deeplabcut/pose_estimation_pytorch/data/transforms.py - main transforms implementation
  • deeplabcut/pose_estimation_pytorch/data/preprocessor.py
  • deeplabcut/pose_estimation_pytorch/data/dataset.py

I'd like to contribute to developing this feature but have some questions about the desired interface:

  1. Custom transforms vs. built-ins: Should we implement custom DLC-specific transforms (e.g., KeypointAwareCrop for cropping around annotated keypoints) using PyTorch, or adapt to use built-in v2 transforms?
  2. API compatibility: Should the config format remain the same (e.g., hflip, affine, crop_sampling), or take advantage of v2's declarative API?
  3. Backward compatibility: Should we maintain Albumentations as a fallback, or fully migrate to v2?

Thank you in advance!
Juan

Linguagem predominante
Python
Estrelas
5.8k
Forks
1.8k
Merge médio
2d 12h
PRs com merge (30d)
14

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de DeepLabCut/DeepLabCut

Todas as issues de DeepLabCut/DeepLabCut

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.