WHULuoJiaTeam / Model_Zoo

Apache License 2.0
11 stars 1 forks source link

Change_Detection DSIFN_v3执行predict的时候,报错 #17

Open xsbrsg opened 3 months ago

xsbrsg commented 3 months ago

python prediction.py --checkpoint_path ./checkpoint/model/DSFIN_3-24_445.ckpt --left_input_file ./datasets/LEVIR-CD/test/A/test_1.png --right_input_file ./datasets/LEVIR-CD/test/B/test_1.png load test weights from %s ./checkpoint/model/DSFIN_3-24_445.ckpt loaded test weights from %s ./checkpoint/model/DSFIN_3-24_445.ckpt ================ image1 type:<class 'numpy.ndarray'>, image2 type:<class 'numpy.ndarray'> [CRITICAL] PIPELINE(21247,7f33e350c740,python):2024-03-14-06:55:01.257.355 [luojianet_ms/ccsrc/pipeline/jit/pipeline.cc:243] CheckArgsValid] The inputs types of the outermost network 'DSIFN.construct' support bool, int, float, None, tensor, mstype.Number(mstype.bool, mstype.int, mstype.float, mstype.uint), and tuple or list containing only these types, and dict whose values are these types, but the 0th arg type is <class 'list'>, value is '[array([[[0.5411765 , 0.5529412 , 0.56078434, ..., 0.00392157,

  1. , 0. ], [0.50980395, 0.5137255 , 0.52156866, ..., 0.00784314,
  2. , 0. ], [0.52156866, 0.5176471 , 0.52156866, ..., 0. ,
  3. , 0. ], ..., [0. , 0.00784314, 0.04313726, ..., 0. , 0.0627451 , 0.16862746], [0.03529412, 0.07843138, 0.14901961, ..., 0. ,
  4. , 0. ], [0.07058824, 0.09803922, 0.13333334, ..., 0. ,
  5. , 0. ]],

    [[0.49803922, 0.50980395, 0.5176471 , ..., 0.10196079, 0.07450981, 0.08627451], [0.46666667, 0.47058824, 0.47843137, ..., 0.10588235, 0.08235294, 0.09411765], [0.47843137, 0.4745098 , 0.47843137, ..., 0.08627451, 0.07843138, 0.07450981], ..., [0.08235294, 0.09411765, 0.12941177, ..., 0.07450981, 0.16078432, 0.26666668], [0.12156863, 0.16470589, 0.23529412, ..., 0.07843138, 0.05882353, 0.09019608], [0.15686275, 0.18431373, 0.21960784, ..., 0.09019608, 0.07450981, 0.08627451]],

    [[0.3882353 , 0.4 , 0.40784314, ..., 0.08627451, 0.07450981, 0.09411765], [0.35686275, 0.36078432, 0.36862746, ..., 0.09019608, 0.08235294, 0.10196079], [0.36862746, 0.3647059 , 0.36862746, ..., 0.07058824, 0.06666667, 0.08235294], ..., [0.07058824, 0.08235294, 0.11764706, ..., 0.04313726, 0.13725491, 0.2509804 ], [0.10980392, 0.15294118, 0.22352941, ..., 0.04313726, 0.03529412, 0.07450981], [0.14509805, 0.17254902, 0.20784314, ..., 0.04705882, 0.05098039, 0.0627451 ]]], dtype=float32), array([[[0.3372549 , 0.3372549 , 0.32941177, ..., 0.34117648, 0.3647059 , 0.40392157], [0.3137255 , 0.30980393, 0.30980393, ..., 0.41960785, 0.37254903, 0.32941177], [0.3254902 , 0.32156864, 0.31764707, ..., 0.49803922, 0.43529412, 0.3764706 ], ..., [0.11372549, 0.18039216, 0.22352941, ..., 0.20392157, 0.18431373, 0.20392157], [0.16078432, 0.09411765, 0.09803922, ..., 0.21176471, 0.2627451 , 0.23921569], [0.14901961, 0.13333334, 0.09019608, ..., 0.18039216, 0.19607843, 0.13333334]],

    [[0.32941177, 0.32941177, 0.32156864, ..., 0.32941177, 0.3529412 , 0.39215687], [0.30588236, 0.3019608 , 0.3019608 , ..., 0.40784314, 0.36078432, 0.31764707], [0.31764707, 0.3137255 , 0.30980393, ..., 0.4862745 , 0.42352942, 0.3647059 ], ..., [0.1254902 , 0.19215687, 0.23529412, ..., 0.21176471, 0.19215687, 0.21176471], [0.17254902, 0.10588235, 0.10980392, ..., 0.21960784, 0.27058825, 0.24705882], [0.16078432, 0.14509805, 0.10196079, ..., 0.1882353 , 0.20392157, 0.14117648]],

    [[0.27058825, 0.27058825, 0.2627451 , ..., 0.30980393, 0.33333334, 0.37254903], [0.24705882, 0.24313726, 0.24313726, ..., 0.3882353 , 0.34117648, 0.29803923], [0.25882354, 0.25490198, 0.2509804 , ..., 0.46666667, 0.40392157, 0.34509805], ..., [0.08235294, 0.14901961, 0.19215687, ..., 0.16078432, 0.14117648, 0.16078432], [0.12941177, 0.0627451 , 0.06666667, ..., 0.16862746, 0.21960784, 0.19607843], [0.11764706, 0.10196079, 0.05882353, ..., 0.13333334, 0.14901961, 0.08627451]]], dtype=float32)]'. For more details, please search 'outermost network' at https://www.luojianet_ms.cn. Traceback (most recent call last): File "prediction.py", line 102, in pred_single(args_opt.checkpoint_path,args_opt.left_input_file,args_opt.right_input_file,args_opt.output_folder) File "prediction.py", line 80, in pred_single output = model(images).asnumpy() File "/usr/local/lib/python3.7/dist-packages/luojianet_ms/nn/cell.py", line 587, in call out = self.compile_and_run(args) File "/usr/local/lib/python3.7/dist-packages/luojianet_ms/nn/cell.py", line 965, in compile_and_run self.compile(inputs) File "/usr/local/lib/python3.7/dist-packages/luojianet_ms/nn/cell.py", line 938, in compile _cell_graph_executor.compile(self, *inputs, phase=self.phase, auto_parallel_mode=self._auto_parallel_mode) File "/usr/local/lib/python3.7/dist-packages/luojianet_ms/common/api.py", line 1007, in compile result = self._graph_executor.compile(obj, args_list, phase, self._use_vm_mode()) TypeError: luojianet_ms/ccsrc/pipeline/jit/pipeline.cc:243 CheckArgsValid] The inputs types of the outermost network 'DSIFN.construct' support bool, int, float, None, tensor, mstype.Number(mstype.bool, mstype.int, mstype.float, mstype.uint), and tuple or list containing only these types, and dict whose values are these types, but the 0th arg type is <class 'list'>, value is '[array([[[0.5411765 , 0.5529412 , 0.56078434, ..., 0.00392157,

  6. , 0. ], [0.50980395, 0.5137255 , 0.52156866, ..., 0.00784314,
  7. , 0. ], [0.52156866, 0.5176471 , 0.52156866, ..., 0. ,
  8. , 0. ], ..., [0. , 0.00784314, 0.04313726, ..., 0. , 0.0627451 , 0.16862746], [0.03529412, 0.07843138, 0.14901961, ..., 0. ,
  9. , 0. ], [0.07058824, 0.09803922, 0.13333334, ..., 0. ,
  10. , 0. ]],

    [[0.49803922, 0.50980395, 0.5176471 , ..., 0.10196079, 0.07450981, 0.08627451], [0.46666667, 0.47058824, 0.47843137, ..., 0.10588235, 0.08235294, 0.09411765], [0.47843137, 0.4745098 , 0.47843137, ..., 0.08627451, 0.07843138, 0.07450981], ..., [0.08235294, 0.09411765, 0.12941177, ..., 0.07450981, 0.16078432, 0.26666668], [0.12156863, 0.16470589, 0.23529412, ..., 0.07843138, 0.05882353, 0.09019608], [0.15686275, 0.18431373, 0.21960784, ..., 0.09019608, 0.07450981, 0.08627451]],

    [[0.3882353 , 0.4 , 0.40784314, ..., 0.08627451, 0.07450981, 0.09411765], [0.35686275, 0.36078432, 0.36862746, ..., 0.09019608, 0.08235294, 0.10196079], [0.36862746, 0.3647059 , 0.36862746, ..., 0.07058824, 0.06666667, 0.08235294], ..., [0.07058824, 0.08235294, 0.11764706, ..., 0.04313726, 0.13725491, 0.2509804 ], [0.10980392, 0.15294118, 0.22352941, ..., 0.04313726, 0.03529412, 0.07450981], [0.14509805, 0.17254902, 0.20784314, ..., 0.04705882, 0.05098039, 0.0627451 ]]], dtype=float32), array([[[0.3372549 , 0.3372549 , 0.32941177, ..., 0.34117648, 0.3647059 , 0.40392157], [0.3137255 , 0.30980393, 0.30980393, ..., 0.41960785, 0.37254903, 0.32941177], [0.3254902 , 0.32156864, 0.31764707, ..., 0.49803922, 0.43529412, 0.3764706 ], ..., [0.11372549, 0.18039216, 0.22352941, ..., 0.20392157, 0.18431373, 0.20392157], [0.16078432, 0.09411765, 0.09803922, ..., 0.21176471, 0.2627451 , 0.23921569], [0.14901961, 0.13333334, 0.09019608, ..., 0.18039216, 0.19607843, 0.13333334]],

    [[0.32941177, 0.32941177, 0.32156864, ..., 0.32941177, 0.3529412 , 0.39215687], [0.30588236, 0.3019608 , 0.3019608 , ..., 0.40784314, 0.36078432, 0.31764707], [0.31764707, 0.3137255 , 0.30980393, ..., 0.4862745 , 0.42352942, 0.3647059 ], ..., [0.1254902 , 0.19215687, 0.23529412, ..., 0.21176471, 0.19215687, 0.21176471], [0.17254902, 0.10588235, 0.10980392, ..., 0.21960784, 0.27058825, 0.24705882], [0.16078432, 0.14509805, 0.10196079, ..., 0.1882353 , 0.20392157, 0.14117648]],

    [[0.27058825, 0.27058825, 0.2627451 , ..., 0.30980393, 0.33333334, 0.37254903], [0.24705882, 0.24313726, 0.24313726, ..., 0.3882353 , 0.34117648, 0.29803923], [0.25882354, 0.25490198, 0.2509804 , ..., 0.46666667, 0.40392157, 0.34509805], ..., [0.08235294, 0.14901961, 0.19215687, ..., 0.16078432, 0.14117648, 0.16078432], [0.12941177, 0.0627451 , 0.06666667, ..., 0.16862746, 0.21960784, 0.19607843], [0.11764706, 0.10196079, 0.05882353, ..., 0.13333334, 0.14901961, 0.08627451]]], dtype=float32)]'. For more details, please search 'outermost network' at https://www.luojianet_ms.cn. 貌似是输入的数据类型不对