-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementing critical solution part I
- Loading branch information
Showing
7 changed files
with
566 additions
and
34 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,4 @@ def get_img(): | |
else: | ||
img.save(destination + '.jpg') | ||
img = cv2.imread(destination + '.jpg') | ||
|
||
return img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
from YOLO_small_tf import YOLO_TF | ||
import time | ||
import cv2 | ||
import numpy as np | ||
|
||
yolo = YOLO_TF() | ||
def is_cell_red(cell): | ||
return cell[3] > 180 | ||
|
||
yolo.imshow = False | ||
s = time.time() | ||
yolo.detect_from_file('resources/test.jpg') | ||
print('Detection time: ' + str(time.time()-s)) | ||
def check_row(row): | ||
distance = 0 | ||
large = 0 | ||
|
||
result = yolo.result | ||
def detect(image): | ||
# BGR | ||
largest_distance = 0 | ||
for row in np.array(image)[0]: | ||
print(row) | ||
|
||
|
||
|
||
print('result') | ||
detect(cv2.imread('resources/test_img.PNG')) |