Skip to content

Commit

Permalink
add rgb convert
Browse files Browse the repository at this point in the history
  • Loading branch information
shinmura0 authored Jun 12, 2019
1 parent 916329d commit ce65756
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DOC/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def main(camera_FPS, camera_width, camera_height, inference_scale, threshold):

# prediction
if flag_score == True:
prepimg = cv2.resize(image, (resize_image_width, resize_image_height))
prepimg = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)## 2019.6.12add
prepimg = cv2.resize(prepimg, (resize_image_width, resize_image_height))
prepimg = prepimg[crop_start_y:crop_end_y, crop_start_x:crop_end_x]
prepimg = np.array(prepimg).reshape((1, inference_scale, inference_scale, 3))
test = model.predict(prepimg / 255)
Expand Down

0 comments on commit ce65756

Please sign in to comment.