Wrong Roboflow return result after prediction
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- computer-vision, machine-learning
Research direction
Start with the model.predict("test.jpg", confidence=40, overlap=0).json() call and reproduce the reported coordinates for test.jpg. Compare those results with the Roboflow UI output and the saved visualization, then determine why the bounding boxes differ. Done means the API and UI results agree for this reproduction or the discrepancy is documented with a clear resolution.
Written by the indexing model from the issue text.
Description
Hi
I am trying out the api to return the result. The result of the bounding box seem to be off despite when I do the roboflow save action to save the image to visualize the bounding box. The save action shows the correct position of the bounding box but not the return result. Any advice?
predict = model.predict("test.jpg", confidence=40, overlap=0).json()
gives when the python return the json result:
{'x': 508.5, 'y': 212.5, 'width': 263.0, 'height': 225.0, 'confidence': 0.9291292428970337, 'class': 'car', 'image_path': 'test.jpg', 'prediction_type': 'ObjectDetectionModel'}
{'x': 233.0, 'y': 164.0, 'width': 40.0, 'height': 34.0, 'confidence': 0.8354455232620239, 'class': 'car', 'image_path': 'test.jpg', 'prediction_type': 'ObjectDetectionModel'}
{'x': 347.5, 'y': 173.0, 'width': 53.0, 'height': 146.0, 'confidence': 0.7597783803939819, 'class': 'person', 'image_path': 'test.jpg', 'prediction_type': 'ObjectDetectionModel'}
whereas if i drop the image into the roboflow ui to do the detection, using confidence level of 40 and overlap of 0, on the roboflow ui , it is
{
"predictions": [
{
"x": 406.5,
"y": 170,
"width": 211,
"height": 180,
"confidence": 0.929,
"class": "car"
},
{
"x": 277.5,
"y": 138.5,
"width": 43,
"height": 117,
"confidence": 0.84,
"class": "person"
},
{
"x": 186.5,
"y": 131.5,
"width": 31,
"height": 27,
"confidence": 0.784,
"class": "car"
}
]
}
- Dominant language
- Python
- Stars
- 642
- Forks
- 146
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 13
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from roboflow/roboflow-python
-
`--json` output is not valid JSON for `search --export`, `image upload <dir>`, `model upload` and `version download`Possibly taken @cdeil claimed this 37 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 20/100
roboflow/roboflow-python#546 ·
Maintainers usually reply within 1 day
-
Failed uploads are reported as success: Version.deploy() / Workspace.deploy_model() don't raise, and roboflow model upload / roboflow image upload <dir> exit 0May be free again A pull request for this issue was closed without being merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
roboflow/roboflow-python#545 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
roboflow/roboflow-python#505 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
roboflow/roboflow-python#433 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
roboflow/roboflow-python#429 ·
Maintainers usually reply within 1 day
All issues in roboflow/roboflow-python
Similar issues
-
area:core-platform effort:S priority:P3 risk:night-safe status:ready type:test
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
randomparity/kdive#3620 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
FinanceFlash/unvibecode#760 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
google-research/google-research#3470 ·
Maintainers usually reply within 21 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
mrvautin/ha-workouts#11 ·