How to change the size of an image in Azure's custom vision service?

410 Views Asked by At

I want to train model by using custom vision but when i add images in custom vision. Custom vision convert resize my image into (512,512). If there is any option so that i can set limit like (2000,2000) in custom vision.

1

There are 1 best solutions below

0
On

If there is any option so that i can set limit like (2000,2000) in custom vision.

Yes, you can use imutils.resize() to resize the image to required dimensions.

For example:

import cv2
import imutils

image = cv2.imread('test.png')
resized = imutils.resize(image, width=2000)
revert = imutils.resize(resized, width=2000)

cv2.imwrite('testresized.png', resized)
cv2.imwrite('testoriginal.png', image)
cv2.waitKey()

You can refer to Crop the center for the specific input size for the model, Resize Image using Opencv Python and preserving the quality and Resize an image with a max width and height, using openCV