-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
预测相关 #12
Comments
in get_cls_text foreA = ', '.join(['remote sensing image foreground objects']+img_infos[i]['jsonA']) KeyError: 'jsonA' |
https://github.com/dyzy41/ChangeCLIP/blob/release/tools/inference_img.py |
need more bug information |
|
parser.add_argument('--file_list', default='/root/autodl-tmp/ChangeCLIP-release/CDdata/LEVIR-CD256/test.txt', help='Image file')
parser.add_argument('--config', default='/root/autodl-tmp/ChangeCLIP-release/configs/0cd_ce/changeclip_levir.py', help='Config file')
parser.add_argument('--checkpoint', default='/root/autodl-tmp/ChangeCLIP-release/ChangeCLIP_best_weights/changeclip_levir/best_mIoU_iter_17000.pth', help='Checkpoint file')
为什么在运行/tools/infer_folderCD.py代码的时候出现了
Traceback (most recent call last):
File "/root/autodl-tmp/ChangeCLIP-release/tools/infer_folderCD.py", line 72, in
main()
File "/root/autodl-tmp/ChangeCLIP-release/tools/infer_folderCD.py", line 64, in main
results = model.test_step(data)
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/model/base_model/base_model.py", line 145, in test_step
return self._run_forward(data, mode='predict') # type: ignore
File "/root/miniconda3/lib/python3.8/site-packages/mmengine/model/base_model/base_model.py", line 361, in _run_forward
results = self(**data, mode=mode)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/root/autodl-tmp/ChangeCLIP-release/mmseg/models/segmentors/base.py", line 96, in forward
return self.predict(inputs, data_samples)
File "/root/autodl-tmp/ChangeCLIP-release/mmseg/models/segmentors/ChangeCLIPCD.py", line 514, in predict
seg_logits = self.inference(inputs, batch_img_metas)
File "/root/autodl-tmp/ChangeCLIP-release/mmseg/models/segmentors/ChangeCLIPCD.py", line 747, in inference
seg_logit = self.whole_inference(inputs, batch_img_metas)
File "/root/autodl-tmp/ChangeCLIP-release/mmseg/models/segmentors/ChangeCLIPCD.py", line 718, in whole_inference
seg_logits = self.encode_decode(inputs, batch_img_metas)
File "/root/autodl-tmp/ChangeCLIP-release/mmseg/models/segmentors/ChangeCLIPCD.py", line 219, in encode_decode
textA, textB = self.get_cls_text(batch_img_metas, False)
File "/root/autodl-tmp/ChangeCLIP-release/mmseg/models/segmentors/ChangeCLIPCD.py", line 388, in get_cls_text
foreA = ', '.join(['remote sensing image foreground objects']+img_infos[i]['jsonA'])
KeyError: 'jsonA'
的错误,而且我想知道,如果我仅仅想预测两张图片之间变化的话,有没有简短一点的预测代码,感谢
The text was updated successfully, but these errors were encountered: