nowe shelfy kolorowe wziuuu #10

Merged
s444428 merged 10 commits from s444428/AL-2020:master into master 2020-06-09 22:56:57 +02:00
4 changed files with 7 additions and 4 deletions
Showing only changes of commit e1eab58672 - Show all commits

View File

@ -1,7 +1,7 @@
import cv2
import torch
from nn_model import Net
from torchvision.transforms import transforms
from codes_recognizer.network_model import Net
def recognizer(path):
@ -14,9 +14,8 @@ def recognizer(path):
# load nn model
model = Net()
model.load_state_dict(torch.load('model.pt'))
model.load_state_dict(torch.load('codes_recognizer/model.pt'))
model.eval()
img = cv2.imread(path)
img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

View File

@ -76,11 +76,14 @@ def run():
'''
# list [x, y]
dest_shelf = new_product.shelf()
dest_field = board[dest_shelf[0], dest_shelf[1]]
dest_field = board[dest_shelf[0]][dest_shelf[1]]
path = functions.a_star(board[agent.y][agent.x], dest_field, board)
''''''
agent.item = new_product
path.pop(len(path) - 1)
next_step = path.pop(len(path) - 1)
agent.is_busy = True
if next_step is not None:

View File

@ -32,4 +32,5 @@ class FinalProduct:
self.img = create_image(self)
def shelf(self):
print(self.img)
return assigning(self.img);