Skip to content

Commit ca98bd7

Browse files
Merge pull request #126 from roboflow/classification-inference-fixes
Classification Inference Fix - PredictionGroup
2 parents 9aac59f + ed179ca commit ca98bd7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

roboflow/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from roboflow.core.project import Project
99
from roboflow.core.workspace import Workspace
1010

11-
__version__ = "0.2.32"
11+
__version__ = "0.2.33"
1212

1313

1414
def check_key(api_key, model, notebook, num_retries=0):

roboflow/models/classification.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def predict(self, image_path, hosted=False):
4747
# Create buffer
4848
buffered = io.BytesIO()
4949
image.save(buffered, quality=90, format="JPEG")
50+
img_dims = image.size
5051
# Base64 encode image
5152
img_str = base64.b64encode(buffered.getvalue())
5253
img_str = img_str.decode("ascii")
@@ -66,7 +67,10 @@ def predict(self, image_path, hosted=False):
6667
raise Exception(resp.text)
6768

6869
return PredictionGroup.create_prediction_group(
69-
resp.json(), image_path=image_path, prediction_type=CLASSIFICATION_MODEL
70+
resp.json(),
71+
image_dims=img_dims,
72+
image_path=image_path,
73+
prediction_type=CLASSIFICATION_MODEL,
7074
)
7175

7276
def load_model(self, name, version):

0 commit comments

Comments
 (0)