theAIGuysCode / YOLOv3-Cloud-Tutorial

Everything you need in order to get YOLOv3 up and running in the cloud. Learn to train your custom YOLOv3 object detector in the cloud for free!
90 stars 78 forks source link

testing gray scale images? #6

Closed ridvanozdemir closed 3 years ago

ridvanozdemir commented 4 years ago

Hello, how can I modify this code for gray scale images? def imShow(path): import cv2 import matplotlib.pyplot as plt %matplotlib inline

image = cv2.imread(path) height, width = image.shape[:2] resized_image = cv2.resize(image,(3width, 3height), interpolation = cv2.INTER_CUBIC)

fig = plt.gcf() fig.set_size_inches(18, 10) plt.axis("off") plt.imshow(cv2.cvtColor(resized_image, cv2.COLOR_BGR2RGB)) plt.show()