IsHYuhi / ST-CGAN_Stacked_Conditional_Generative_Adversarial_Networks

Unofficial implementation of ''Stacked Conditional Generative Adversarial Networks for Jointly Learning Shadow Detection and Shadow Removal'' with PyTorch
67 stars 15 forks source link

Training on my dataset #19

Closed Hamzat0014 closed 2 years ago

Hamzat0014 commented 2 years ago

I am trying to train your model on my dataset. My dataset consist of RGB shaow, shadowfree and shadow mask images. All images have 3 channels.

I am facing this issue: "RuntimeError: Given groups=1, weight of size [64, 4, 4, 4], expected input[2, 6, 256, 256] to have 4 channels, but got 6 channels instead"

can you please guide me how to proceed further, will be much thankful to you.

IsHYuhi commented 2 years ago

I’m sorry for the delayed response. You need to change" in_channels" 9 of the models.

If you still have problems, please re-open the issue.

Thanks.

hidataset890 commented 2 years ago

Hello, now the pre-training model is invalid, can you send it to me? be deeply grateful

Hamzat0014 commented 2 years ago

Hello, now the pre-training model is invalid, can you send it to me? be deeply grateful

@hidataset890 i have the checkpoints downloaded of pre-trained model.

Hamzat0014 commented 2 years ago

I’m sorry for the delayed response. You need to change" in_channels" 9 of the models.

If you still have problems, please re-open the issue.

Thanks.

@IsHYuhi i am still facing the same issue.

My point is that if the images shape, data type etc if all are same as of the istd, data set than why the issue is arising?

Hamzat0014 commented 2 years ago

please check your email

Hamzat0014 commented 2 years ago

I’m sorry for the delayed response. You need to change" in_channels" 9 of the models.

If you still have problems, please re-open the issue.

Thanks.

Hello

Hope you are well. There was an issue in data_loader.py and ISTD_transform.py, the model was taking 3 channels for train_B, while the model was designed to take only 1 channel. so by adding following line of code in data_loader.py the issue was resolved:

gt_shadow=gt_shadow[:1]