Skip to content
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

DRENet model training on degraded images #14

Open
namita-agarwal opened this issue Apr 12, 2023 · 8 comments
Open

DRENet model training on degraded images #14

namita-agarwal opened this issue Apr 12, 2023 · 8 comments

Comments

@namita-agarwal
Copy link

Hi there,

I am not able to train the DRENet model using the degraded images. I have provided the degraded images path in the ship.yaml file as follows:
train: /content/gdrive/MyDrive/DRENet_new/DRENet/LEVIR_ship_dataset_full/train/degrade/
val: /content/gdrive/MyDrive/DRENet_new/DRENet/LEVIR_ship_dataset_full/val/degrade/

I get the following error message.

AssertionError: train: No labels in /content/gdrive/MyDrive/DRENet_new/DRENet/LEVIR_ship_dataset_full/train/degrade.cache. Can not train without labels.

Please advise if I am providing the incorrect file path. Looking forward to hearing from you.
Thanks.

@WindVChen
Copy link
Owner

Hi @namita-agarwal ,

  1. Is your data structure consistent with here?

  2. And the dataset path in the ship.yaml may need to target to images subfolder, not degrade.

You can recheck the above steps, delete all the .cache files, and rerun.

@namita-agarwal
Copy link
Author

Thanks @WindVChen for your reply.

I have the following two queries now.

  1. I am wondering if I need to change the degraded images file names also (e.g. degraded_img_1.png) according to
    ── train/val/test
    ├── images
    ├── img_1.png
    ├── img_2.png
    ├── ...
    ├── degrade
    # images processed by Selective Degradation (refer to our paper for detals)
    ├── degraded_img_1.png
    ├── degraded_img_2.png
    ├── ...
    ├── labels
    ├── label_1.txt
    ├── label_2.txt
    ├── ...
  2. If I target the dataset path in the ship.yaml to images subfolder, not degrade folder according to the above data structure, wouldn't it take the normal (non-degraded) images for training the model because images subfolder has non-degraded images only?

Thanks in advance.

@WindVChen
Copy link
Owner

  1. The files in different subfolders need to share the same names.
  2. The program will search for the degraded images in the degrade subfolder. You can refer to the code here

You can take a look at our LEVIR-Ship dataset, which may help to understand the dataset format.

@namita-agarwal
Copy link
Author

@WindVChen many thanks for this! I tried your solution to train the DRENet model by keeping the degraded images in the degrade folder and non-degraded images in the images folder. But I am bit confused on this. In this way, are we training the DRENet model on degraded or non-degraded images?

Can we train the DRENet model using non-degraded images only? If yes, how so?

Thanks in advance.

@WindVChen
Copy link
Owner

Hi there,

The DRENet will leverage both degraded images and non-degraded images for training. It is recommended to have a look at the design details in our paper.

@namita-agarwal
Copy link
Author

@WindVChen many thanks for your reply. I got it now completely.

I am wondering whether we can change the severity of blurriness to images using the DegradeGenerate.py? If yes, could you please advise how?

Thanks in advance.

@WindVChen
Copy link
Owner

Yes, the Degraded function and its severity can be changed according to your needs. You can see how we determine the degraded function and its parameters in #3 and #4 (comment). I think these may help a lot.

@namita-agarwal
Copy link
Author

@WindVChen thanks a million. It helped me a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants