How To Train SegFormer on a Custom Dataset for Computer Vision

preview_player
Показать описание
A new state of the art semantic segmentation algorithm emerges from the lineage of transformer models: SegFormer!

In this video, we will walk through how to train SegFormer on a custom dataset using Pytorch Lightning to classify every pixel in an image.

Рекомендации по теме
Комментарии
Автор

can you tell me how to recode attention part in Segformer? please give me some assist

Mindantusiast
Автор

hi can you tell me how to modify the code on a custom dataset which is not their in roboflow

neelotpaltripathi
Автор

Hello, looks like `validation_epoch_end` has been depreciated. Now we need to use `on_validation_epoch_end`. How should I set up `on_validation_epoch_end` to get the notebook working. Looks like it doesn't take outputs as an input.

mikeazatov
Автор

Hi. Can i have the updated code for this? Because i try the step that you give and it display error in the part of pl.trainer

riyanggaming
Автор

Hey, how can I train this on my own custom dataset which is already labeled means I have both masks and images, but when I upload both masks and images to roboflow private project it shows all the images are not annotated. what should I do? kindly help asap thanks

muhammadharoon
Автор

hi I've got error when install roboflow==0.2.7. it's ok to install 0.2.10, bt it got error while running the following code:
trainer = pl.Trainer(
gpus=1,
callbacks=[early_stop_callback, checkpoint_callback],
max_epochs=500,
val_check_interval=len(train_dataloader),
)
TypeError: Trainer.__init__() got an unexpected keyword argument 'gpus'
is this a version matching issue? Do you have any suggestions

aaliceMG
Автор

When training the model it creates checkpoint files. Is it possible to load those checkpoint files post training? I'm struggling to load them as `load_from_checkpoint` or
`resume_from_checkpoint` don't seem to work here.

mikeazatov
Автор

hello I'm new to this. Does anyone have any advice on how to do this with my own dataset instead of using roboflow. I have my own images and masks and would like to use them.

SS-zqsc
Автор

I train custom model. weight is .ckpt. How i run with .ckpt another notebook.

muratkoc
Автор

Hello!

I have a question regarding the visualization part. I would like to show the original image and add the segmentation mask as an overlay (like most segmentation demos). However, when I try to do that using the "images" that we output during the prediction cell, it doesn't work since the shape of images is 3, 128, 128 and to show the actual image in opencv or PIL we need a 128, 128, 3 array.

I tried reshaping and I tried converting to different types but I got unexpected results.

Any help please?

nourhesham