Skip to content

Commit 1634419

Browse files
IC pipeline to accept PNG images (#870)
* initial commit * style Co-authored-by: [email protected] <[email protected]>
1 parent e4a05c0 commit 1634419

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/deepsparse/image_classification/pipelines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def _preprocess_image(self, image) -> numpy.ndarray:
183183
image = Image.fromarray(image)
184184
elif isinstance(image, str):
185185
# load image from string filepath
186-
image = Image.open(image)
186+
image = Image.open(image).convert("RGB")
187187
elif isinstance(image, numpy.ndarray):
188188
image = image.astype(numpy.uint8)
189189
if image.shape[0] < image.shape[-1]:

0 commit comments

Comments
 (0)