roboflow / roboflow/roboflow-python

Result of `model.predict` has type `ClassificationModel`, no keypoints.

Open
#345 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
629
Forks
140
Avg merge
2d 2h
Merged PRs (30d)
5

Description

Tested on several projects:

pip install supervision roboflow
version = rf.workspace("roboflow-jvuqo").project("football-field-detection-f07vi").version(8)
version.download("yolov8")
kp_model = version.model
assert kp_model is not None

first_image_path = os.listdir(f"{dataset.location}/train/images")[0]
first_image_path = f"{dataset.location}/train/images/{first_image_path}"

result = kp_model.predict(first_image_path).json()

# Fails
keypoints = sv.KeyPoints.from_inference(result)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with the supplied pip install command and football-field model example, then inspect the result of kp_model.predict(first_image_path).json(). Compare that output with the input expected by sv.KeyPoints.from_inference(result); done means the keypoint inference result is represented so this call no longer fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.