Skip to content

Commit 01b18d1

Browse files
authored
Merge pull request #28829 from RadhakrishnanIyer/master
Update convert_to_opencv function in Python Code
2 parents 778e737 + 6dfe129 commit 01b18d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

articles/cognitive-services/Custom-Vision-Service/export-model-python.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ The steps above use the following helper functions:
126126
```Python
127127
def convert_to_opencv(image):
128128
# RGB -> BGR conversion is performed as well.
129+
image = image.convert('RGB')
129130
r,g,b = np.array(image).T
130131
opencv_image = np.array([b,g,r]).transpose()
131132
return opencv_image
@@ -208,4 +209,4 @@ The results of running the image tensor through the model will then need to be m
208209
Next, learn how to wrap your model into a mobile application:
209210
* [Use your exported Tensorflow model in an Android application](https://github.com/Azure-Samples/cognitive-services-android-customvision-sample)
210211
* [Use your exported CoreML model in an Swift iOS application](https://go.microsoft.com/fwlink/?linkid=857726)
211-
* [Use your exported CoreML model in an iOS application with Xamarin](https://github.com/xamarin/ios-samples/tree/master/ios11/CoreMLAzureModel)
212+
* [Use your exported CoreML model in an iOS application with Xamarin](https://github.com/xamarin/ios-samples/tree/master/ios11/CoreMLAzureModel)

0 commit comments

Comments
 (0)