Merge pull request 'Model generated + tests screenshots' (#31) from neural into master
Reviewed-on: #31
Before Width: | Height: | Size: 230 KiB After Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 438 KiB |
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 641 KiB |
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 372 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 203 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 143 KiB |
Before Width: | Height: | Size: 647 KiB After Width: | Height: | Size: 256 KiB |
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 487 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 700 KiB After Width: | Height: | Size: 349 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 507 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 224 KiB After Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 145 KiB |
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 204 KiB |
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 296 KiB After Width: | Height: | Size: 850 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 162 KiB |
Before Width: | Height: | Size: 267 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 139 KiB |
BIN
assets/neural_network_tests_screenshots/1-3.png
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
assets/neural_network_tests_screenshots/19-21.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
assets/neural_network_tests_screenshots/29-31.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
assets/neural_network_tests_screenshots/39-41.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
assets/neural_network_tests_screenshots/48-50.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
assets/neural_network_tests_screenshots/9-11.png
Normal file
After Width: | Height: | Size: 40 KiB |
12
main.py
@ -135,15 +135,15 @@ def recognize_plants(plants_array, fields_for_astar, fields_for_movement, agent)
|
|||||||
if b == 0:
|
if b == 0:
|
||||||
for j in range(11):
|
for j in range(11):
|
||||||
if plants_array[j][i] == 'carrot':
|
if plants_array[j][i] == 'carrot':
|
||||||
img = 'assets/learning/test/carrot/' + str(random.randint(1, 25)) + '.jpg'
|
img = 'assets/learning/test/carrot/' + str(random.randint(1, 200)) + '.jpg'
|
||||||
pred = neural_network.prediction(img, model)
|
pred = neural_network.prediction(img, model)
|
||||||
show_plant_img(img)
|
show_plant_img(img)
|
||||||
elif plants_array[j][i] == 'potato':
|
elif plants_array[j][i] == 'potato':
|
||||||
img = 'assets/learning/test/potato/' + str(random.randint(1, 25)) + '.jpg'
|
img = 'assets/learning/test/potato/' + str(random.randint(1, 200)) + '.jpg'
|
||||||
pred = neural_network.prediction(img, model)
|
pred = neural_network.prediction(img, model)
|
||||||
show_plant_img(img)
|
show_plant_img(img)
|
||||||
elif plants_array[j][i] == 'wheat':
|
elif plants_array[j][i] == 'wheat':
|
||||||
img = 'assets/learning/test/wheat/' + str(random.randint(1, 25)) + '.jpg'
|
img = 'assets/learning/test/wheat/' + str(random.randint(1, 200)) + '.jpg'
|
||||||
pred = neural_network.prediction(img, model)
|
pred = neural_network.prediction(img, model)
|
||||||
show_plant_img(img)
|
show_plant_img(img)
|
||||||
else:
|
else:
|
||||||
@ -156,15 +156,15 @@ def recognize_plants(plants_array, fields_for_astar, fields_for_movement, agent)
|
|||||||
else:
|
else:
|
||||||
for j in range(10,-1,-1):
|
for j in range(10,-1,-1):
|
||||||
if plants_array[j][i] == 'carrot':
|
if plants_array[j][i] == 'carrot':
|
||||||
img = 'assets/learning/test/carrot/' + str(random.randint(1, 25)) + '.jpg'
|
img = 'assets/learning/test/carrot/' + str(random.randint(1, 200)) + '.jpg'
|
||||||
pred = neural_network.prediction(img, model)
|
pred = neural_network.prediction(img, model)
|
||||||
show_plant_img(img)
|
show_plant_img(img)
|
||||||
elif plants_array[j][i] == 'potato':
|
elif plants_array[j][i] == 'potato':
|
||||||
img = 'assets/learning/test/potato/' + str(random.randint(1, 25)) + '.jpg'
|
img = 'assets/learning/test/potato/' + str(random.randint(1, 200)) + '.jpg'
|
||||||
pred = neural_network.prediction(img, model)
|
pred = neural_network.prediction(img, model)
|
||||||
show_plant_img(img)
|
show_plant_img(img)
|
||||||
elif plants_array[j][i] == 'wheat':
|
elif plants_array[j][i] == 'wheat':
|
||||||
img = 'assets/learning/test/wheat/' + str(random.randint(1, 25)) + '.jpg'
|
img = 'assets/learning/test/wheat/' + str(random.randint(1, 200)) + '.jpg'
|
||||||
pred = neural_network.prediction(img, model)
|
pred = neural_network.prediction(img, model)
|
||||||
show_plant_img(img)
|
show_plant_img(img)
|
||||||
else:
|
else:
|
||||||
|