ByungKwanLee / Causal-Unsupervised-Segmentation

Official PyTorch Implementation code for realizing the technical part of Causal Unsupervised Semantic sEgmentation (CAUSE) to improve performance of unsupervised semantic segmentation. (Under Review)
15 stars 2 forks source link

Training on Custom Dataset #7

Open AkankshaP0102 opened 8 months ago

AkankshaP0102 commented 8 months ago

How can I use Causal for training on custom dataset? Is it possible to use it for video semantic segmentation??

ByungKwanLee commented 8 months ago

You replace my loader wirh your dataloader based on pytorch custom dataloader!

We did not support video segmentation!

AkankshaP0102 commented 8 months ago

Thank you for your quick response @ByungKwanLee . Is there any way I can implement Video segmentation using Causal since the architecture performs quite well on images??

ByungKwanLee commented 8 months ago

Dealing with each image frame extracted from video may be a proper trial

AkankshaP0102 commented 8 months ago

Thank you.Will work on it.

AkankshaP0102 commented 7 months ago

Working on training the model on custom dataset but not getting any luck on creating the dataloader. Please can you help @ByungKwanLee as in how can I create my own dataloader as I am new in the field of computer vision task. Thank you.

ByungKwanLee commented 7 months ago

Did you see Pytorch Custom Dataloader documentation?

AkankshaP0102 commented 5 months ago

yes sir created my own pytorch custom dataloader but facing issue while running the step 2 of training process. The error looks like this: File "/media/emsg/2d46715b-293d-4478-acd4-5f000d443896/anaconda3/envs/causal/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 68, in _wrap fn(i, args) File "/media/emsg/2d46715b-293d-4478-acd4-5f000d443896/Causal-Unsupervised-Segmentation/train_front_door_mlp.py", line 263, in main train( File "/media/emsg/2d46715b-293d-4478-acd4-5f000d443896/Causal-Unsupervised-Segmentation/utils/utils.py", line 36, in wrapper func(args, **kwards) File "/media/emsg/2d46715b-293d-4478-acd4-5f000d443896/Causal-Unsupervised-Segmentation/train_front_door_mlp.py", line 87, in train loss_linear = F.cross_entropy(flat_linear_logits[flat_label_mask], flat_label[flat_label_mask]) IndexError: The shape of the mask [2408448] at index 0 does not match the shape of the indexed tensor [802816, 39] at index 0 Please help me with the same. your help will be be appreciated. Thank you in advance