From 9fb37f950ad355e5017f89c22e24c26c8fec2178 Mon Sep 17 00:00:00 2001 From: "DESKTOP-UL3K6JV\\Daniq" <31.10.93@bk.ru> Date: Sun, 16 Jun 2024 17:31:21 +0500 Subject: [PATCH] Added division by 255 --- classifiers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/classifiers.py b/classifiers.py index 81aa98b..b67f689 100644 --- a/classifiers.py +++ b/classifiers.py @@ -56,6 +56,7 @@ class YOLOClassify: def classify(self, yolo_classifier_model, image_to_classify): image_to_classify = image_to_classify.permute(0, 3, 1, 2) + image_to_classify = image_to_classify / 255 image_to_classify = image_to_classify.squeeze(0) transform = transforms.Compose([ transforms.Resize(size=(224, 224))