Open COUJIALUO opened 4 months ago
in get_cls_text foreA = ', '.join(['remote sensing image foreground objects']+img_infos[i]['jsonA']) KeyError: 'jsonA' Same problem, is there any solutions? Thank you for your work.
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' 的错误,而且我想知道,如果我仅仅想预测两张图片之间变化的话,有没有简短一点的预测代码,感谢
https://github.com/dyzy41/ChangeCLIP/blob/release/tools/inference_img.py
in get_cls_text foreA = ', '.join(['remote sensing image foreground objects']+img_infos[i]['jsonA']) KeyError: 'jsonA' Same problem, is there any solutions? Thank you for your work.
need more bug information
in get_cls_text foreA = ', '.join(['remote sensing image foreground objects']+img_infos[i]['jsonA']) KeyError: 'jsonA' Same problem, is there any solutions? Thank you for your work.
need more bug information thanks,i have solved this bug。
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'
的错误,而且我想知道,如果我仅仅想预测两张图片之间变化的话,有没有简短一点的预测代码,感谢