From 4d6fd3cd3acf226424dafabe19ca978883036423 Mon Sep 17 00:00:00 2001 From: "li.zhenye" Date: Fri, 5 Aug 2022 09:19:51 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E5=AF=BC=E8=87=B4=E9=97=AE=E9=A2=98=E7=9A=84?= =?UTF-8?q?=E5=9C=B0=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 841bb9f..a491067 100755 --- a/main.py +++ b/main.py @@ -11,8 +11,8 @@ def main(only_spec=False, only_color=False): spec_detector = SpecDetector(blk_model_path=Config.blk_model_path, pixel_model_path=Config.pixel_model_path) rgb_detector = RgbDetector(tobacco_model_path=Config.rgb_tobacco_model_path, background_model_path=Config.rgb_background_model_path) - _, _ = spec_detector.predict(np.ones(Config.nRows, Config.nCols, Config.nBands)*0.4),\ - rgb_detector.predict(np.ones(Config.nRgbRows, Config.nRgbCols, Config.nRgbBands)*0.4) + _, _ = spec_detector.predict(np.ones(Config.nRows, Config.nCols, Config.nBands, dtype=float)*0.4),\ + rgb_detector.predict(np.ones((Config.nRgbRows, Config.nRgbCols, Config.nRgbBands), dtype=np.uint8)*40) total_len = Config.nRows * Config.nCols * Config.nBands * 4 # float型变量, 4个字节 total_rgb = Config.nRgbRows * Config.nRgbCols * Config.nRgbBands * 1 # int型变量 if not os.access(img_fifo_path, os.F_OK):