diff --git a/model_2_crops.pth b/model_2_crops.pth new file mode 100644 index 0000000..6954cc1 Binary files /dev/null and b/model_2_crops.pth differ diff --git a/neuralnetwork.py b/neuralnetwork.py index 9a42e0d..568abaf 100644 --- a/neuralnetwork.py +++ b/neuralnetwork.py @@ -9,12 +9,14 @@ from PIL import Image import random imageSize = (128, 128) -labels = ['carrot','corn', 'potato', 'tomato'] # musi być w kolejności alfabetycznej +labels = ['carrot','corn', 'potato', 'tomato'] # musi być w kolejności alfabetycznej fertilizer = {labels[0]: 'kompost', labels[1]: 'saletra amonowa', labels[2]: 'superfosfat', labels[3]:'obornik kurzy'} - +#labels = ['corn','tomato'] #uncomment this two lines for 2 crops only +#fertilizer = {labels[0]: 'kompost', labels[1]: 'saletra amonowa'} torch.manual_seed(42) -device = torch.device("cuda" if torch.cuda.is_available() else "cpu") +#device = torch.device("cuda" if torch.cuda.is_available() else "cpu") +device = torch.device("cpu") # device = torch.device("mps") if torch.backends.mps.is_available() else torch.device('cpu') # print(device)