voldemortX / pytorch-auto-drive

PytorchAutoDrive: Segmentation models (ERFNet, ENet, DeepLab, FCN...) and Lane detection models (SCNN, RESA, LSTR, LaneATT, BézierLaneNet...) based on PyTorch with fast training, visualization, benchmarking & deployment help
BSD 3-Clause "New" or "Revised" License
837 stars 137 forks source link

fine-tuning a llamas model with culanes data #108

Closed MehdiAlilou closed 1 year ago

MehdiAlilou commented 2 years ago

I have a model trained on llamas dataset using erfnet_scnn_llamas configuration and would like to introduce culanes data set to this model as well. I use --checkpoint to load the model and used culanes config file for the second round training on culanes. However I get an error because flattened_size=4500, for erfnet_culanes.py config file and it is 4400 in the erfnet_llamas.py. This causes an error while loading the checkpoint. I tried to change the input size for culane config file and change the model parameters as well but still getting error. Could you please guide me how to solve this issue?

voldemortX commented 2 years ago

@MehdiAlilou I have never done this before. Could you share your latest culane fine-tuning config file?

MehdiAlilou commented 2 years ago

I used the default config file available in /configs/lane_detection/scnn/erfnet_culane.py. The input size is different from the llamas' config file. I tried to make the same input size as the llamas' config file but it did not work. Previously I used erfnet_llamas.py to train on llamas.

voldemortX commented 2 years ago

ok. Let me check that when I have free GPUs later today.

MehdiAlilou commented 2 years ago

Thank you very much.

voldemortX commented 2 years ago

@MehdiAlilou I can't use my testing env for now. But I think this config could do the finetuning, maybe try it out? culane_finetune.zip

MehdiAlilou commented 2 years ago

@voldemortX thanks for your prompt response. I will test it tomorrow and will let you know the result. By the way I had another question while using --train mode how to involve the validation set so we can save improving checkpoints?

voldemortX commented 2 years ago

Unfortunately, we did not leave that functional for lane detection. You will have to do some hacking yourself.

As earlier discussed in #79 . However, in your finetuning case checkpointing may really be important. Perhaps you can add a bit code to save checkpoints every some iterations. And we will welcome a PR if this is implemented through command line option like --checkpointing-steps for example.

MehdiAlilou commented 2 years ago

I actually did some changes to save every couple of epochs, just wanted to double-check with you. I can work on that.

voldemortX commented 1 year ago

This issue seems to be addressed. I'll close it for now. Feel free to continue commenting for reopen/open a new one.