PanchengZhao / LAKE-RED

[CVPR 2024] LAKE-RED: Camouflaged Images Generation by Latent Background Knowledge Retrieval-Augmented Diffusion.
Apache License 2.0
30 stars 3 forks source link

Runtime Error when Running demo.sh Script #4

Open titan-exasaur opened 3 weeks ago

titan-exasaur commented 3 weeks ago

I have created a new conda environment on my local machine using environment.yaml

this is my modified demo.sh file /home/kumar/anaconda3/envs/ldm/bin/python inference_one_sample.py --image /media/kumar/HDD1/INFIDATA/LABORATORY/lakered/LAKE-RED/demo/src/COD_CAMO_camourflage_00012.jpg \ --mask /media/kumar/HDD1/INFIDATA/LABORATORY/lakered/LAKE-RED/demo/src/COD_CAMO_camourflage_00012.png \ --log_path demo_res

When I try to execute demo.sh I am getting the following runtime error


Called with args:
Namespace(Steps=50, batchsize=9, dilate_kernel=2, image='/media/kumar/HDD1/INFIDATA/LABORATORY/lakered/LAKE-RED/demo/src/COD_CAMO_camourflage_00012.jpg', isReplace=False, log_path='demo_res', mask='/media/kumar/HDD1/INFIDATA/LABORATORY/lakered/LAKE-RED/demo/src/COD_CAMO_camourflage_00012.png', model_path='ckpt/LAKERED.ckpt', yaml_path='ldm/models/ldm/inpainting_big/config_LAKERED.yaml')
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 387.25 M params.
Keeping EMAs of 433.
making attention of type 'none' with 512 in_channels
Working with z of shape (1, 3, 64, 64) = 12288 dimensions.
making attention of type 'none' with 512 in_channels
Using first stage also as cond stage.
Restored from ckpt/LAKERED.ckpt with 0 missing and 0 unexpected keys
RuntimeError:  /media/kumar/HDD1/INFIDATA/LABORATORY/lakered/LAKE-RED/demo/src/COD_CAMO_camourflage_00012.jpg```
PanchengZhao commented 3 weeks ago

Hei, I have checked the code and was able to run it successfully using “demo.sh”.

This is actually the second report I've received of this bug, but I wasn't able to successfully reproduce it.

Based on the information you provided, the error could be due to an incorrect image path. Please verify that the path correctly points to the target image.

I'll go ahead and try to find the bug further, and if you can provide more detail on the location of the error through debugging, it may help us resolve the problem faster.