加了一次提前预测

This commit is contained in:
li.zhenye 2022-08-05 09:08:30 +08:00
parent 5a34a5a7bd
commit 63c1f5cf22

View File

@ -11,6 +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) 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, rgb_detector = RgbDetector(tobacco_model_path=Config.rgb_tobacco_model_path,
background_model_path=Config.rgb_background_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)
total_len = Config.nRows * Config.nCols * Config.nBands * 4 # float型变量, 4个字节 total_len = Config.nRows * Config.nCols * Config.nBands * 4 # float型变量, 4个字节
total_rgb = Config.nRgbRows * Config.nRgbCols * Config.nRgbBands * 1 # int型变量 total_rgb = Config.nRgbRows * Config.nRgbCols * Config.nRgbBands * 1 # int型变量
if not os.access(img_fifo_path, os.F_OK): if not os.access(img_fifo_path, os.F_OK):