Closed ShenZheng2000 closed 7 months ago
I didn't modify the test_unpaired.py file. You can refer to the readme file and use test.py to process the images. As for your error, you can see that
File "test_unpaired.py", line 141, in main
sr_t = model.get_sr(lq=lr_t.cuda(), heat=None)
here, the model didn't receive the semantic map and features, thus in the forward function of the LLFlow_model, shown as:
File "/longdata/anurag_storage/2PCNet/LLIE/Model/SKF/LLFlow_SKF/code/models/LLFlow_model.py", line 354, in get_sr
return self.get_sr_with_z(lq, heat, seed, z, epses, seg_map, seg_ft)[0]
the features and maps are NoneType. And in the test.py file, we produce the features and map as follows:
with torch.cuda.amp.autocast():
if opt['seg']:
seg_map, seg_ft = seg_model(lr_t[:, 0:3, :, :].cuda())
else:
seg_map, seg_ft = None, None
sr_t = model.get_sr(lq=lr_t.cuda(), heat=None, seg_map=seg_map, seg_ft=seg_ft)
You can see the differences between this model.get_sr()
and which in the test_unpaired.py file.
Hope the reply can solve your problem. Have a good day!
If you want to test you own data without GT, you can just set the GT path the same as the input path in the test.py file.
I am running:
But got the following error:
While investigating the code, I noticed that the problem is that seg_feat is not being passed here. Consequently, when we proceed to the model, seg_feat is always None, which ultimately leads to the error mentioned above
Could you please address this issue?