Skip to content

Dependency alignment with DeepLabCut: opencv-python-headless and NumPy 2 #37

Description

@deruyter92

Context

DeepLabCut installs FMPose3D via the optional [fmpose3d] extra. We are preparing a DLC release that:

  • removes DLC’s numpy<2 upper bound for the default (PyTorch) install (DeepLabCut#3499)
  • declares OpenCV explicitly on the DLC base deps as opencv-python-headless (DeepLabCut#3508)

pyproject.toml currently specifies non-aligned dependencies:

  • numpy>=1.18.5,<2.0
  • opencv-python>=4.5.0 (also again under the viz extra)

When users install deeplabcut[fmpose3d], that can:

  1. block NumPy 2 even though DLC’s core path is ready for it
  2. pull both opencv-python and opencv-python-headless (DLC/albumentations/napari prefer headless; FMPose3D/imgaug prefer full). Both distribute cv2, so install order decides which build you get.

Related: #36 already proposes removing NumPy (and related) upper bounds for DLC compatibility.

Questions

  1. Can FMPose3D switch to opencv-python-headless?
    DLC does not need GUI HighGUI (cv2.imshow etc.), and headless avoids libGL issues on servers/CI/Colab.
    Would it be acceptable for FMPose3D to depend on opencv-python-headless instead of opencv-python?
    If something in FMPose3D requires the full OpenCV build, please say what — then we should document the dual-install.

  2. Is numpy<2 still required?
    I.e. is the <2.0 pin there because of a known runtime break under NumPy 2, or was it inherited for compatibility with older stacks / DLC?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions