MendelXu / ANN

semantic segmentation,pytorch,non-local
Apache License 2.0
312 stars 63 forks source link

put the downloaded trained [model] to where? #21

Open zizhu-ang opened 2 years ago

zizhu-ang commented 2 years ago

-Validation
Download trained model to checkpoints/seg/cityscapes/fs_annn_cityscapes_segohem_latest.pth and test on validation set with single scale.

  bash scripts/seg/cityscapes/run_fs_annn_cityscapes_seg.sh val ohem

Hello, would you like to put the downloaded trained [model] in the cityscapes directory or the .pth directory, or change the name of the model to fs_annn_cityscapes_segohem_latest.pth?I changed the name of the downloaded model and put it in the cityscapes directory, and the following error occurred.

2022-03-27 18:54:21,362 INFO    [controller.py, 67] Testing start...
Traceback (most recent call last):
  File "main.py", line 201, in <module>
    Controller.test(runner)
  File "/peng/zqk/ANN-master/methods/tools/controller.py", line 84, in test
    runner.test(test_dir, out_dir)
  File "/peng/zqk/ANN-master/methods/seg/fcn_segmentor_test.py", line 48, in test
    total_logits = self.ss_test(data_dict)
  File "/peng/zqk/ANN-master/methods/seg/fcn_segmentor_test.py", line 88, in ss_test
    results = self._predict(data_dict)
  File "/peng/zqk/ANN-master/methods/seg/fcn_segmentor_test.py", line 213, in _predict
    results = self.seg_net.forward(data_dict['img'])
  File "/home/usr2/anaconda2/envs/zqk36/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 143, in forward
    outputs = self.parallel_apply(replicas, inputs, kwargs)
  File "/home/usr2/anaconda2/envs/zqk36/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 153, in parallel_apply
    return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
  File "/home/usr2/anaconda2/envs/zqk36/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 36, in parallel_apply
    assert len(modules) == len(inputs)
AssertionError
evaluate the result...
ERROR: Found no prediction for ground truth /data/DataSet/Cityscapes/val/label/lindau_000041_000019_leftImg8bit.png