diff --git a/.idea/misc.xml b/.idea/misc.xml
index acd589d..40e984a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -4,7 +4,4 @@
-
-
-
\ No newline at end of file
diff --git a/Tpics/bio/biological_1.jpg b/Tpics/bio/biological_1.jpg
deleted file mode 100644
index 8c6745f..0000000
Binary files a/Tpics/bio/biological_1.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_10.jpg b/Tpics/bio/biological_10.jpg
deleted file mode 100644
index 008237c..0000000
Binary files a/Tpics/bio/biological_10.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_11.jpg b/Tpics/bio/biological_11.jpg
deleted file mode 100644
index a578e42..0000000
Binary files a/Tpics/bio/biological_11.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_12.jpg b/Tpics/bio/biological_12.jpg
deleted file mode 100644
index d714be5..0000000
Binary files a/Tpics/bio/biological_12.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_13.jpg b/Tpics/bio/biological_13.jpg
deleted file mode 100644
index f5a2df3..0000000
Binary files a/Tpics/bio/biological_13.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_14.jpg b/Tpics/bio/biological_14.jpg
deleted file mode 100644
index d94c665..0000000
Binary files a/Tpics/bio/biological_14.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_15.jpg b/Tpics/bio/biological_15.jpg
deleted file mode 100644
index bc7091a..0000000
Binary files a/Tpics/bio/biological_15.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_16.jpg b/Tpics/bio/biological_16.jpg
deleted file mode 100644
index 3bd568b..0000000
Binary files a/Tpics/bio/biological_16.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_17.jpg b/Tpics/bio/biological_17.jpg
deleted file mode 100644
index 8ae791f..0000000
Binary files a/Tpics/bio/biological_17.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_18.jpg b/Tpics/bio/biological_18.jpg
deleted file mode 100644
index 9ee1bef..0000000
Binary files a/Tpics/bio/biological_18.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_19.jpg b/Tpics/bio/biological_19.jpg
deleted file mode 100644
index 2e9ebe5..0000000
Binary files a/Tpics/bio/biological_19.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_2.jpg b/Tpics/bio/biological_2.jpg
deleted file mode 100644
index cff5cff..0000000
Binary files a/Tpics/bio/biological_2.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_20.jpg b/Tpics/bio/biological_20.jpg
deleted file mode 100644
index 6951cb5..0000000
Binary files a/Tpics/bio/biological_20.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_3.jpg b/Tpics/bio/biological_3.jpg
deleted file mode 100644
index 4d7e4f7..0000000
Binary files a/Tpics/bio/biological_3.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_4.jpg b/Tpics/bio/biological_4.jpg
deleted file mode 100644
index b4f0e2d..0000000
Binary files a/Tpics/bio/biological_4.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_5.jpg b/Tpics/bio/biological_5.jpg
deleted file mode 100644
index 43d15b3..0000000
Binary files a/Tpics/bio/biological_5.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_6.jpg b/Tpics/bio/biological_6.jpg
deleted file mode 100644
index b8a98a8..0000000
Binary files a/Tpics/bio/biological_6.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_7.jpg b/Tpics/bio/biological_7.jpg
deleted file mode 100644
index b0bb7e8..0000000
Binary files a/Tpics/bio/biological_7.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_8.jpg b/Tpics/bio/biological_8.jpg
deleted file mode 100644
index a1499c3..0000000
Binary files a/Tpics/bio/biological_8.jpg and /dev/null differ
diff --git a/Tpics/bio/biological_9.jpg b/Tpics/bio/biological_9.jpg
deleted file mode 100644
index c06ee89..0000000
Binary files a/Tpics/bio/biological_9.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_1.jpg b/Tpics/glass/glass_1.jpg
deleted file mode 100644
index 98a4de4..0000000
Binary files a/Tpics/glass/glass_1.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_144.jpg b/Tpics/glass/glass_144.jpg
deleted file mode 100644
index 0f0841a..0000000
Binary files a/Tpics/glass/glass_144.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_235.jpg b/Tpics/glass/glass_235.jpg
deleted file mode 100644
index 5eee9c9..0000000
Binary files a/Tpics/glass/glass_235.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_237.jpg b/Tpics/glass/glass_237.jpg
deleted file mode 100644
index 3d102f2..0000000
Binary files a/Tpics/glass/glass_237.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_250.jpg b/Tpics/glass/glass_250.jpg
deleted file mode 100644
index 1dc6c16..0000000
Binary files a/Tpics/glass/glass_250.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_308.jpg b/Tpics/glass/glass_308.jpg
deleted file mode 100644
index 2afb47c..0000000
Binary files a/Tpics/glass/glass_308.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_319.jpg b/Tpics/glass/glass_319.jpg
deleted file mode 100644
index a590e37..0000000
Binary files a/Tpics/glass/glass_319.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_327.jpg b/Tpics/glass/glass_327.jpg
deleted file mode 100644
index 4d5c0d0..0000000
Binary files a/Tpics/glass/glass_327.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_354.jpg b/Tpics/glass/glass_354.jpg
deleted file mode 100644
index 5478a64..0000000
Binary files a/Tpics/glass/glass_354.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_374.jpg b/Tpics/glass/glass_374.jpg
deleted file mode 100644
index ea1a972..0000000
Binary files a/Tpics/glass/glass_374.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_387.jpg b/Tpics/glass/glass_387.jpg
deleted file mode 100644
index b91ebb5..0000000
Binary files a/Tpics/glass/glass_387.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_402.jpg b/Tpics/glass/glass_402.jpg
deleted file mode 100644
index 55db5d4..0000000
Binary files a/Tpics/glass/glass_402.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_410.jpg b/Tpics/glass/glass_410.jpg
deleted file mode 100644
index 2ef7b69..0000000
Binary files a/Tpics/glass/glass_410.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_415.jpg b/Tpics/glass/glass_415.jpg
deleted file mode 100644
index c75ba72..0000000
Binary files a/Tpics/glass/glass_415.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_416.jpg b/Tpics/glass/glass_416.jpg
deleted file mode 100644
index f8389c6..0000000
Binary files a/Tpics/glass/glass_416.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_422.jpg b/Tpics/glass/glass_422.jpg
deleted file mode 100644
index 74c6384..0000000
Binary files a/Tpics/glass/glass_422.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_430.jpg b/Tpics/glass/glass_430.jpg
deleted file mode 100644
index 02a13f8..0000000
Binary files a/Tpics/glass/glass_430.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_454.jpg b/Tpics/glass/glass_454.jpg
deleted file mode 100644
index 4d07778..0000000
Binary files a/Tpics/glass/glass_454.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_59.jpg b/Tpics/glass/glass_59.jpg
deleted file mode 100644
index 4f6068b..0000000
Binary files a/Tpics/glass/glass_59.jpg and /dev/null differ
diff --git a/Tpics/glass/glass_69.jpg b/Tpics/glass/glass_69.jpg
deleted file mode 100644
index e10a7bc..0000000
Binary files a/Tpics/glass/glass_69.jpg and /dev/null differ
diff --git a/Tpics/mixed/clothes_1.jpg b/Tpics/mixed/clothes_1.jpg
deleted file mode 100644
index e04bf52..0000000
Binary files a/Tpics/mixed/clothes_1.jpg and /dev/null differ
diff --git a/Tpics/mixed/clothes_15.jpg b/Tpics/mixed/clothes_15.jpg
deleted file mode 100644
index 458e1b6..0000000
Binary files a/Tpics/mixed/clothes_15.jpg and /dev/null differ
diff --git a/Tpics/mixed/clothes_16.jpg b/Tpics/mixed/clothes_16.jpg
deleted file mode 100644
index 9907cf3..0000000
Binary files a/Tpics/mixed/clothes_16.jpg and /dev/null differ
diff --git a/Tpics/mixed/clothes_2.jpg b/Tpics/mixed/clothes_2.jpg
deleted file mode 100644
index f719c4e..0000000
Binary files a/Tpics/mixed/clothes_2.jpg and /dev/null differ
diff --git a/Tpics/mixed/clothes_3.jpg b/Tpics/mixed/clothes_3.jpg
deleted file mode 100644
index e8b29d7..0000000
Binary files a/Tpics/mixed/clothes_3.jpg and /dev/null differ
diff --git a/Tpics/mixed/clothes_30.jpg b/Tpics/mixed/clothes_30.jpg
deleted file mode 100644
index e0e32af..0000000
Binary files a/Tpics/mixed/clothes_30.jpg and /dev/null differ
diff --git a/Tpics/mixed/shoes_1.jpg b/Tpics/mixed/shoes_1.jpg
deleted file mode 100644
index a3edf63..0000000
Binary files a/Tpics/mixed/shoes_1.jpg and /dev/null differ
diff --git a/Tpics/mixed/shoes_2.jpg b/Tpics/mixed/shoes_2.jpg
deleted file mode 100644
index 96978ab..0000000
Binary files a/Tpics/mixed/shoes_2.jpg and /dev/null differ
diff --git a/Tpics/mixed/shoes_21.jpg b/Tpics/mixed/shoes_21.jpg
deleted file mode 100644
index bee404b..0000000
Binary files a/Tpics/mixed/shoes_21.jpg and /dev/null differ
diff --git a/Tpics/mixed/shoes_22.jpg b/Tpics/mixed/shoes_22.jpg
deleted file mode 100644
index b019bf6..0000000
Binary files a/Tpics/mixed/shoes_22.jpg and /dev/null differ
diff --git a/Tpics/mixed/shoes_24.jpg b/Tpics/mixed/shoes_24.jpg
deleted file mode 100644
index f13f674..0000000
Binary files a/Tpics/mixed/shoes_24.jpg and /dev/null differ
diff --git a/Tpics/mixed/shoes_30.jpg b/Tpics/mixed/shoes_30.jpg
deleted file mode 100644
index 10df815..0000000
Binary files a/Tpics/mixed/shoes_30.jpg and /dev/null differ
diff --git a/Tpics/mixed/trash_1.jpg b/Tpics/mixed/trash_1.jpg
deleted file mode 100644
index f1e3ed6..0000000
Binary files a/Tpics/mixed/trash_1.jpg and /dev/null differ
diff --git a/Tpics/mixed/trash_2.jpg b/Tpics/mixed/trash_2.jpg
deleted file mode 100644
index f806145..0000000
Binary files a/Tpics/mixed/trash_2.jpg and /dev/null differ
diff --git a/Tpics/mixed/trash_3.jpg b/Tpics/mixed/trash_3.jpg
deleted file mode 100644
index 814ffd3..0000000
Binary files a/Tpics/mixed/trash_3.jpg and /dev/null differ
diff --git a/Tpics/mixed/trash_38.jpg b/Tpics/mixed/trash_38.jpg
deleted file mode 100644
index 729be25..0000000
Binary files a/Tpics/mixed/trash_38.jpg and /dev/null differ
diff --git a/Tpics/mixed/trash_39.jpg b/Tpics/mixed/trash_39.jpg
deleted file mode 100644
index 064659c..0000000
Binary files a/Tpics/mixed/trash_39.jpg and /dev/null differ
diff --git a/Tpics/mixed/trash_4.jpg b/Tpics/mixed/trash_4.jpg
deleted file mode 100644
index 34b51cd..0000000
Binary files a/Tpics/mixed/trash_4.jpg and /dev/null differ
diff --git a/Tpics/mixed/trash_40.jpg b/Tpics/mixed/trash_40.jpg
deleted file mode 100644
index e86b907..0000000
Binary files a/Tpics/mixed/trash_40.jpg and /dev/null differ
diff --git a/Tpics/mixed/trash_5.jpg b/Tpics/mixed/trash_5.jpg
deleted file mode 100644
index 95f5b4b..0000000
Binary files a/Tpics/mixed/trash_5.jpg and /dev/null differ
diff --git a/Tpics/paper/cardboard_1.jpg b/Tpics/paper/cardboard_1.jpg
deleted file mode 100644
index 41de836..0000000
Binary files a/Tpics/paper/cardboard_1.jpg and /dev/null differ
diff --git a/Tpics/paper/cardboard_10.jpg b/Tpics/paper/cardboard_10.jpg
deleted file mode 100644
index dca6c4d..0000000
Binary files a/Tpics/paper/cardboard_10.jpg and /dev/null differ
diff --git a/Tpics/paper/cardboard_2.jpg b/Tpics/paper/cardboard_2.jpg
deleted file mode 100644
index ef7744b..0000000
Binary files a/Tpics/paper/cardboard_2.jpg and /dev/null differ
diff --git a/Tpics/paper/cardboard_3.jpg b/Tpics/paper/cardboard_3.jpg
deleted file mode 100644
index 277cb36..0000000
Binary files a/Tpics/paper/cardboard_3.jpg and /dev/null differ
diff --git a/Tpics/paper/cardboard_4.jpg b/Tpics/paper/cardboard_4.jpg
deleted file mode 100644
index 75d94b4..0000000
Binary files a/Tpics/paper/cardboard_4.jpg and /dev/null differ
diff --git a/Tpics/paper/cardboard_5.jpg b/Tpics/paper/cardboard_5.jpg
deleted file mode 100644
index f1fd06b..0000000
Binary files a/Tpics/paper/cardboard_5.jpg and /dev/null differ
diff --git a/Tpics/paper/cardboard_6.jpg b/Tpics/paper/cardboard_6.jpg
deleted file mode 100644
index b397408..0000000
Binary files a/Tpics/paper/cardboard_6.jpg and /dev/null differ
diff --git a/Tpics/paper/cardboard_7.jpg b/Tpics/paper/cardboard_7.jpg
deleted file mode 100644
index 69e8459..0000000
Binary files a/Tpics/paper/cardboard_7.jpg and /dev/null differ
diff --git a/Tpics/paper/cardboard_8.jpg b/Tpics/paper/cardboard_8.jpg
deleted file mode 100644
index 56fbff9..0000000
Binary files a/Tpics/paper/cardboard_8.jpg and /dev/null differ
diff --git a/Tpics/paper/cardboard_9.jpg b/Tpics/paper/cardboard_9.jpg
deleted file mode 100644
index f46482e..0000000
Binary files a/Tpics/paper/cardboard_9.jpg and /dev/null differ
diff --git a/Tpics/paper/paper_1.jpg b/Tpics/paper/paper_1.jpg
deleted file mode 100644
index e6a6587..0000000
Binary files a/Tpics/paper/paper_1.jpg and /dev/null differ
diff --git a/Tpics/paper/paper_131.jpg b/Tpics/paper/paper_131.jpg
deleted file mode 100644
index 6c71461..0000000
Binary files a/Tpics/paper/paper_131.jpg and /dev/null differ
diff --git a/Tpics/paper/paper_139.jpg b/Tpics/paper/paper_139.jpg
deleted file mode 100644
index 67d8e46..0000000
Binary files a/Tpics/paper/paper_139.jpg and /dev/null differ
diff --git a/Tpics/paper/paper_149.jpg b/Tpics/paper/paper_149.jpg
deleted file mode 100644
index e7c7f51..0000000
Binary files a/Tpics/paper/paper_149.jpg and /dev/null differ
diff --git a/Tpics/paper/paper_151.jpg b/Tpics/paper/paper_151.jpg
deleted file mode 100644
index f12ea9d..0000000
Binary files a/Tpics/paper/paper_151.jpg and /dev/null differ
diff --git a/Tpics/paper/paper_218.jpg b/Tpics/paper/paper_218.jpg
deleted file mode 100644
index 8d847a6..0000000
Binary files a/Tpics/paper/paper_218.jpg and /dev/null differ
diff --git a/Tpics/paper/paper_219.jpg b/Tpics/paper/paper_219.jpg
deleted file mode 100644
index 7ea2d7e..0000000
Binary files a/Tpics/paper/paper_219.jpg and /dev/null differ
diff --git a/Tpics/paper/paper_235.jpg b/Tpics/paper/paper_235.jpg
deleted file mode 100644
index 4f6fd94..0000000
Binary files a/Tpics/paper/paper_235.jpg and /dev/null differ
diff --git a/Tpics/paper/paper_240.jpg b/Tpics/paper/paper_240.jpg
deleted file mode 100644
index 53a5940..0000000
Binary files a/Tpics/paper/paper_240.jpg and /dev/null differ
diff --git a/Tpics/paper/paper_49.jpg b/Tpics/paper/paper_49.jpg
deleted file mode 100644
index 214efb0..0000000
Binary files a/Tpics/paper/paper_49.jpg and /dev/null differ
diff --git a/Tpics/plastic/metal_181.jpg b/Tpics/plastic/metal_181.jpg
deleted file mode 100644
index 8029f7f..0000000
Binary files a/Tpics/plastic/metal_181.jpg and /dev/null differ
diff --git a/Tpics/plastic/metal_184.jpg b/Tpics/plastic/metal_184.jpg
deleted file mode 100644
index 34e98e9..0000000
Binary files a/Tpics/plastic/metal_184.jpg and /dev/null differ
diff --git a/Tpics/plastic/metal_187.jpg b/Tpics/plastic/metal_187.jpg
deleted file mode 100644
index 20f3dd7..0000000
Binary files a/Tpics/plastic/metal_187.jpg and /dev/null differ
diff --git a/Tpics/plastic/metal_195.jpg b/Tpics/plastic/metal_195.jpg
deleted file mode 100644
index dfc9ba1..0000000
Binary files a/Tpics/plastic/metal_195.jpg and /dev/null differ
diff --git a/Tpics/plastic/metal_196.jpg b/Tpics/plastic/metal_196.jpg
deleted file mode 100644
index 0fa4ba9..0000000
Binary files a/Tpics/plastic/metal_196.jpg and /dev/null differ
diff --git a/Tpics/plastic/metal_211.jpg b/Tpics/plastic/metal_211.jpg
deleted file mode 100644
index 4388d51..0000000
Binary files a/Tpics/plastic/metal_211.jpg and /dev/null differ
diff --git a/Tpics/plastic/metal_58.jpg b/Tpics/plastic/metal_58.jpg
deleted file mode 100644
index 011db3f..0000000
Binary files a/Tpics/plastic/metal_58.jpg and /dev/null differ
diff --git a/Tpics/plastic/metal_64.jpg b/Tpics/plastic/metal_64.jpg
deleted file mode 100644
index f5cfaee..0000000
Binary files a/Tpics/plastic/metal_64.jpg and /dev/null differ
diff --git a/Tpics/plastic/metal_81.jpg b/Tpics/plastic/metal_81.jpg
deleted file mode 100644
index d6e89ce..0000000
Binary files a/Tpics/plastic/metal_81.jpg and /dev/null differ
diff --git a/Tpics/plastic/metal_90.jpg b/Tpics/plastic/metal_90.jpg
deleted file mode 100644
index bac395c..0000000
Binary files a/Tpics/plastic/metal_90.jpg and /dev/null differ
diff --git a/Tpics/plastic/plastic_448.jpg b/Tpics/plastic/plastic_448.jpg
deleted file mode 100644
index 0350dfb..0000000
Binary files a/Tpics/plastic/plastic_448.jpg and /dev/null differ
diff --git a/Tpics/plastic/plastic_449.jpg b/Tpics/plastic/plastic_449.jpg
deleted file mode 100644
index a47004a..0000000
Binary files a/Tpics/plastic/plastic_449.jpg and /dev/null differ
diff --git a/Tpics/plastic/plastic_450.jpg b/Tpics/plastic/plastic_450.jpg
deleted file mode 100644
index eab5372..0000000
Binary files a/Tpics/plastic/plastic_450.jpg and /dev/null differ
diff --git a/Tpics/plastic/plastic_451.jpg b/Tpics/plastic/plastic_451.jpg
deleted file mode 100644
index 78bbb3d..0000000
Binary files a/Tpics/plastic/plastic_451.jpg and /dev/null differ
diff --git a/Tpics/plastic/plastic_452.jpg b/Tpics/plastic/plastic_452.jpg
deleted file mode 100644
index 4236c11..0000000
Binary files a/Tpics/plastic/plastic_452.jpg and /dev/null differ
diff --git a/Tpics/plastic/plastic_453.jpg b/Tpics/plastic/plastic_453.jpg
deleted file mode 100644
index 18c67a4..0000000
Binary files a/Tpics/plastic/plastic_453.jpg and /dev/null differ
diff --git a/Tpics/plastic/plastic_454.jpg b/Tpics/plastic/plastic_454.jpg
deleted file mode 100644
index d450af6..0000000
Binary files a/Tpics/plastic/plastic_454.jpg and /dev/null differ
diff --git a/Tpics/plastic/plastic_455.jpg b/Tpics/plastic/plastic_455.jpg
deleted file mode 100644
index a4a8ffe..0000000
Binary files a/Tpics/plastic/plastic_455.jpg and /dev/null differ
diff --git a/Tpics/plastic/plastic_456.jpg b/Tpics/plastic/plastic_456.jpg
deleted file mode 100644
index e007ff6..0000000
Binary files a/Tpics/plastic/plastic_456.jpg and /dev/null differ
diff --git a/Tpics/plastic/plastic_457.jpg b/Tpics/plastic/plastic_457.jpg
deleted file mode 100644
index 574cac2..0000000
Binary files a/Tpics/plastic/plastic_457.jpg and /dev/null differ
diff --git a/archive.zip b/archive.zip
deleted file mode 100644
index 8968415..0000000
Binary files a/archive.zip and /dev/null differ
diff --git a/classes/Garbagetruck.py b/classes/Garbagetruck.py
index 3111bba..9c1cb51 100644
--- a/classes/Garbagetruck.py
+++ b/classes/Garbagetruck.py
@@ -1,12 +1,10 @@
import math
import heapq
-import numpy as np
from joblib import load
import pygame
from classes.Household import *
from classes.Node import *
from classes.Trashcan import Trashcan
-from tensorflow.keras.models import load_model
class Garbagetruck:
@@ -26,30 +24,21 @@ class Garbagetruck:
self.position = [3, 3]
self.houses: list = []
self.trashcans: list = []
- self.state = None # używane
+ self.state = None
self.segregation = {"Papier": "paper",
"MetalPlastik": "metals_and_plastics",
"Mixed": "mixed",
"Bio": "bio_waste",
"Szklo": "glass"}
- self.route = None # jeszcze nie
- self.scanner = load_model("./classes/best_model_newD.h5")
- self.planner = None # jeszcze nie
+ self.route = None
+ self.scanner = None
+ self.planner = None
self.driver = load("./classes/drzewo.joblib")
self.orientation = 3 # Niech numery będą tak: N - 0, W - 1, S - 2, E - 3 -- po prostu odwrotnie do zegara
self.runningtime = 0
self.movesequence = []
- self.target = None # używane
- self.analising = False # używane
-
- def identify(self, trash):
- obraz = trash.getImage()
- wynik = self.scanner.predict(obraz)
- wynik = np.argmax(wynik)
- typelist = ["paper", "bio_waste", "mixed", "glass", "metals_and_plastics"]
- wynik = typelist[wynik]
- trash.setTtype(wynik)
- print(f"Prawdziwy typ śmieci: {trash.getRealtype()}\nZidentyfikowany typ śmieci: {trash.getTtype()}")
+ self.target = None
+ self.analising = False
def getAnalising(self):
return self.analising
@@ -76,9 +65,9 @@ class Garbagetruck:
can = house.getGarbage()
trashlist = can.getContent()
for trash in trashlist:
- self.identify(trash)
if self.trashweight + trash.getWaga() <= self.capacity:
decision = self.decision(house, trash, can)
+ print(f"{trash.getTtype()} - decyzja: {decision}")
if decision:
self.addTrash(trash)
can.removeContent(trash)
@@ -242,11 +231,10 @@ class Garbagetruck:
x, y = self.getPosition()
return self.mult*x, self.mult*y
- def throwGarbage(self):
- for item in self.trash:
- if item.getTtype() == self.state.getTrashtype():
- self.addTrashweight(item.getWeight * (-1))
- self.trash.remove(item)
+ def throwGarbage(self, trash):
+ if self.segregation[trash.getTtype()] == self.state.getTrashtype():
+ self.addTrashweight(trash.getWeight * (-1))
+ self.trash.remove(trash)
def rotateImage(self, arg):
self.image = pygame.transform.rotate(self.image, 90*arg)
@@ -388,3 +376,9 @@ class Garbagetruck:
# wybor2 = random.choice(self.trashcans)
wybor2.switchFinal()
# print(wybor2)
+
+ def classifyTrash(self):
+ pass
+# Tutaj jest plan żeby dopiero napisać funkcję jak już będzie klasyfikator
+# ogólnie to myślałem żeby po prostu zklasyfikować śmieć i zmienić mu trashtype na rozpoznany,
+# żeby śmieciarka go tak posegreowała
diff --git a/classes/NeuralNetwork.py b/classes/NeuralNetwork.py
deleted file mode 100644
index b9abae5..0000000
--- a/classes/NeuralNetwork.py
+++ /dev/null
@@ -1,89 +0,0 @@
-# Ten plik był odpalany na remote serwerze jupyter notebook, stąd dziwne komentarze i cała baza danych w zipie
-# Skuteczność sieci to mniej więcej 80% na zbiorze walidacyjnym, ale jest przeuczona, bo nie augmentowaliśmy danych
-
-
-import os
-os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
-os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
-from tensorflow.keras import Sequential
-from tensorflow.keras.callbacks import EarlyStopping
-from tensorflow.keras.layers import Dense, Conv2D, MaxPooling2D, Flatten, Input
-from tensorflow.keras.callbacks import ModelCheckpoint
-
-save_best = ModelCheckpoint('./best_model_newD.h5', monitor='val_loss', save_best_only=True)
-es = EarlyStopping(monitor="val_loss", mode="min", patience=5)
-
-EPOCHS = 100
-
-
-# In[2]:
-
-
-from tensorflow.keras.preprocessing.image import ImageDataGenerator
-
-root_path = "./Database/"
-
-gen = ImageDataGenerator(
- rescale=1./255,
- validation_split=0.2
-)
-
-# Load Data
-train_dataset = gen.flow_from_directory(
- root_path,
- class_mode="categorical",
- classes=os.listdir(root_path),
- shuffle=True,
- batch_size=32,
- target_size=(128,128),
- subset="training",
- color_mode='grayscale'
-)
-
-validation_dataset = gen.flow_from_directory(
- root_path,
- class_mode="categorical",
- classes=os.listdir(root_path),
- shuffle=True,
- batch_size=32,
- target_size=(128,128),
- subset="validation",
- color_mode='grayscale'
-)
-
-
-# In[4]:
-
-model = Sequential()
-model.add(Input(shape=(128,128)))
-model.add(Conv2D(filters = 64, kernel_size = (3, 3), activation='relu', input_shape=(128, 128, 1)))
-model.add(MaxPooling2D((2, 2)))
-model.add(Conv2D(filters = 32, kernel_size = (3, 3), activation='relu', input_shape=(64, 64, 1)))
-model.add(MaxPooling2D((2, 2)))
-model.add(Conv2D(filters = 16, kernel_size = (3, 3), activation='relu', input_shape=(32, 32, 1)))
-model.add(MaxPooling2D((2, 2)))
-model.add(Flatten())
-model.add(Dense(128*128, activation='relu'))
-model.add(Dense(1000, activation='relu'))
-# model.add(Dropout(0.2))
-model.add(Dense(25, activation='relu'))
-# model.add(Dropout(0.2))
-model.add(Dense(5, activation='softmax'))
-
-model.compile(optimizer='adam',
- loss='categorical_crossentropy',
- metrics=['accuracy'])
-model.summary()
-
-
-# In[5]:
-
-
-history = model.fit(train_dataset, epochs = EPOCHS, validation_data=(validation_dataset), callbacks = [es, save_best])
-
-
-# In[ ]:
-
-
-
-
diff --git a/classes/Trash.py b/classes/Trash.py
index 72f184f..6cacaff 100644
--- a/classes/Trash.py
+++ b/classes/Trash.py
@@ -1,30 +1,13 @@
-from random import choice as rd
-
-import numpy as np
-
-from classes.trashFunctions import generatePicList
+typelist = ["paper", "metals_and_plastics", "mixed", "bio_waste", "glass"]
class Trash:
- def __init__(self):
- self.tree_type = 0
- self.ttype = "Trash"
- self.real_type = "Trash"
- self.scan_id = 0
- self.waga = 1
- self.image = None
-
- def getRealtype(self):
- return self.real_type
-
- def getScanid(self):
- return self.scan_id
def getTreetype(self):
- return self.tree_type
+ return self.treetype
def setTreetype(self, treetype):
- self.tree_type = id
+ self.treetype = id
return self
def getTtype(self):
@@ -50,70 +33,40 @@ class Trash:
class Papier(Trash):
- lista_obrazow = generatePicList("paper")
-
def __init__(self):
- super().__init__()
- self.tree_type = 1
+ self.treetype = 1
self.ttype = "Papier"
- self.real_type = "Papier"
- self.scan_id = 0
self.waga = 2
self.image = None
- self.setImage(rd(self.lista_obrazow))
class MetalPlastik(Trash):
- lista_obrazow = generatePicList("plastic")
-
def __init__(self):
- super().__init__()
- self.tree_type = 2
+ self.treetype = 2
self.ttype = "MetalPlastik"
- self.real_type = "MetalPlastik"
- self.scan_id = 4
self.waga = 3
self.image = None
- self.setImage(rd(self.lista_obrazow))
class Mixed(Trash):
- lista_obrazow = generatePicList("mixed")
-
def __init__(self):
- super().__init__()
- self.tree_type = 4
+ self.treetype = 4
self.ttype = "Mixed"
- self.real_type = "Mixed"
- self.scan_id = 2
self.waga = 1
self.image = None
- self.setImage(rd(self.lista_obrazow))
class Bio(Trash):
- lista_obrazow = generatePicList("bio")
-
def __init__(self):
- super().__init__()
- self.tree_type = 0
+ self.treetype = 0
self.ttype = "Bio"
- self.real_type = "Bio"
- self.scan_id = 1
self.waga = 2
self.image = None
- self.setImage(rd(self.lista_obrazow))
class Szklo(Trash):
- lista_obrazow = generatePicList("glass")
-
def __init__(self):
- super().__init__()
- self.tree_type = 3
+ self.treetype = 3
self.ttype = "Szklo"
- self.real_type = "Szklo"
- self.scan_id = 3
self.waga = 5
self.image = None
- self.setImage(rd(self.lista_obrazow))
diff --git a/classes/best_model_newD.h5 b/classes/best_model_newD.h5
deleted file mode 100644
index ac6e44b..0000000
Binary files a/classes/best_model_newD.h5 and /dev/null differ
diff --git a/classes/trashFunctions.py b/classes/trashFunctions.py
deleted file mode 100644
index 6a37b18..0000000
--- a/classes/trashFunctions.py
+++ /dev/null
@@ -1,25 +0,0 @@
-import tensorflow as tf
-import os
-import numpy as np
-
-
-def load_and_preprocess_image(file_path, target_size):
- img = tf.io.read_file(file_path)
- img = tf.image.decode_png(img, channels=1)
- img = tf.image.resize(img, target_size)
- img = img / 255.0
- return img
-
-
-def generatePicList(category):
- path = f"./Tpics/{category}"
- dircs = os.listdir(path)
- result = []
- for img in dircs:
- image = f"{path}/" + img
- target_size = (128, 128)
- image_tensor = load_and_preprocess_image(image, target_size)
- image_tensor = np.array(image_tensor)
- image_tensor = np.expand_dims(image_tensor, axis=0)
- result.append(image_tensor)
- return result
diff --git a/main.py b/main.py
index 26f7e11..3a1ef78 100644
--- a/main.py
+++ b/main.py
@@ -15,9 +15,9 @@ trashcans = trashcanGenerator(MULT)
houses = householdGenerator(MULT)
garbagetruck = Garbagetruck(MULT).setHouses(houses).setTrashcans(trashcans)
-# print("Kolejność danych do drzewa:")
-# print("Pora roku - Pora dnia - Typ śmieci - Zapełnienie kosza - Zapełnienie śmieciarki - Zapłacone - Ostatnio zabrane "
-# "- Pogoda")
+print("Kolejność danych do drzewa:")
+print("Pora roku - Pora dnia - Typ śmieci - Zapełnienie kosza - Zapełnienie śmieciarki - Zapłacone - Ostatnio zabrane "
+ "- Pogoda")
running = True
while running:
@@ -48,7 +48,7 @@ while running:
garbagetruck.setMovesequence(moves)
if state:
if state.getFinal():
- # print([trash.getTtype() for trash in state.getGarbage().getContent()])
+ print([trash.getTtype() for trash in state.getGarbage().getContent()])
garbagetruck.switchAnalising()
garbagetruck.getState().switchFinal()
elif not garbagetruck.movesequence: