Skip to content

Commit dfe7773

Browse files
alexarjeclaude
andcommitted
Docs: the OpenPose fallback does not exist on OpenCV 5
installation.md said pose() works with or without an extra, falling back to body_25. On OpenCV 5 that fallback cannot run: the Caffe importer is gone. Stated per OpenCV version. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TZ1T9cWFjCD93GdVrYmM4m
1 parent ffd1b29 commit dfe7773

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

docs/installation.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,20 @@ specially-built OpenCV. Install only what you need:
101101

102102
### Pose estimation
103103

104-
`pose()` works **with or without** an extra installed:
104+
Which backends you can use depends on your OpenCV:
105105

106106
- With `musicalgestures[pose]`, the default **MediaPipe** backend is used, which is recommended:
107-
faster on CPU, 33 landmarks, and no CUDA-enabled OpenCV build needed.
108-
- If MediaPipe is **not** installed, `pose()` automatically falls back to the OpenPose
109-
`body_25` backend. This uses the always-present OpenCV DNN module and auto-downloads
110-
~200 MB of Caffe weights on first use, so pose estimation works either way.
107+
faster on CPU, 33 landmarks, and no CUDA-enabled OpenCV build needed. It carries its own
108+
weights and never touches `cv2.dnn`, so it works on any OpenCV.
109+
- **On OpenCV 4**, if MediaPipe is not installed, `pose()` falls back to the OpenPose
110+
`body_25` backend. This uses OpenCV's DNN module and auto-downloads ~200 MB of Caffe
111+
weights on first use.
112+
- **On OpenCV 5, the OpenPose backends cannot run at all.** OpenCV removed its Caffe importer
113+
in 5.0, and `body_25`, `coco` and `mpi` are Caffe models. From 1.11.0 `pose()` says so with
114+
an `MgDependencyError` before looking for weights, instead of failing deep in the run after
115+
offering a download the environment could never use. Install MediaPipe, or install OpenCV 4
116+
(`pip install 'opencv-python<5'`) if you need the OpenPose skeletons. They are not
117+
interchangeable: 33 landmarks against BODY_25's 25 is a different skeleton.
111118

112119
Pose model weights are downloaded automatically on first use via Python's `urllib`
113120
(cross-platform, no `wget` or platform-specific download scripts), nothing extra to install.

0 commit comments

Comments
 (0)