Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a88d2a2 commit 45ec8d1Copy full SHA for 45ec8d1
utils/utils.py
@@ -6,7 +6,7 @@
6
# 代码仅仅支持RGB图像的预测,所有其它类型的图像都会转化成RGB
7
#---------------------------------------------------------#
8
def cvtColor(image):
9
- if len(np.shape(image)) == 3 and np.shape(image)[-2] == 3:
+ if len(np.shape(image)) == 3 and np.shape(image)[2] == 3:
10
return image
11
else:
12
image = image.convert('RGB')
@@ -59,4 +59,4 @@ def get_lr(optimizer):
59
60
def preprocess_input(image):
61
image /= 255.0
62
- return image
+ return image
0 commit comments