Skip to content

Commit c9f2e2a

Browse files
YunYang1994YunYang1994
YunYang1994
authored and
YunYang1994
committed
deprecated
1 parent a93e7a0 commit c9f2e2a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Diff for: image_demo.py

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
graph = tf.Graph()
2626

2727
original_image = cv2.imread(image_path)
28+
original_image = cv2.cvtColor(original_image, cv2.COLOR_BGR2RGB)
2829
original_image_size = original_image.shape[:2]
2930
image_data = utils.image_preporcess(np.copy(original_image), [input_size, input_size])
3031
image_data = image_data[np.newaxis, ...]

Diff for: video_demo.py

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
while True:
3434
return_value, frame = vid.read()
3535
if return_value:
36+
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
3637
image = Image.fromarray(frame)
3738
else:
3839
raise ValueError("No image!")

0 commit comments

Comments
 (0)