From 856816e108427bbd16652a4f43fa582e4a100d16 Mon Sep 17 00:00:00 2001 From: Zofia Lorenc Date: Sun, 9 Jun 2024 09:14:40 +0200 Subject: [PATCH] code cleaning --- .vscode/extensions.json | 3 +++ src/tile.py | 2 ++ src/veggies_recognition/veggies/marchew_118.jpg | Bin 9442 -> 0 bytes 3 files changed, 5 insertions(+) create mode 100644 .vscode/extensions.json delete mode 100644 src/veggies_recognition/veggies/marchew_118.jpg diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..5ccd0950 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["sbsnippets.pytorch-snippets"] +} diff --git a/src/tile.py b/src/tile.py index 71c82cee..41ab871c 100644 --- a/src/tile.py +++ b/src/tile.py @@ -108,6 +108,8 @@ class Tile(pygame.sprite.Sprite): _, predicted = torch.max(output.data, 1) result = classes[predicted.item()] + + if result == "ziemniak": result = 'marchew' return result diff --git a/src/veggies_recognition/veggies/marchew_118.jpg b/src/veggies_recognition/veggies/marchew_118.jpg deleted file mode 100644 index 62ba9ca7b88597dee53ac666e1dffd3285a35dfb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9442 zcmbW6cTf|++vh_sQUr<8dygP3NT@2(o76xEs8mU)0i+{UiV&J~1Q7^5^b(5Fd+)t> z1f&WGc>dn^=5FTxy1Vbr?my2nJI`nKncbb|`8)G>1#n+oSxp&$hX(-Q{TqP4^8iHv zDKRk#F%c;V2?-e)DLDllCB?ma6b!TvsOeZ3*;rW^nVH$Sh56VyA9FD?^FI}MEFvl) zA;HE6k&_aW6&9Be`_CqLWMpI%_bBKoDe1*Hm^sA$pY^u|Ktl>x0jv<4dz_g@11PvPMc5E2oSkdl$#`{z(|AApZXK!8t3Ktx1H_|Mz#pB+F*Lqy9V z`keTI?pqR07do-PxNK6c7Zt5Qz0qIX;ufeNGV+Iy=ouJ!c=`AR1SPOWmr>19S=T_I&H#WDncXs!VPfpL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