pytorch-auto-drive icon indicating copy to clipboard operation
pytorch-auto-drive copied to clipboard

fine-tuning a llamas model with culanes data

Open MehdiAlilou opened this issue 3 years ago • 8 comments

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?

MehdiAlilou avatar Jul 07 '22 18:07 MehdiAlilou

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

voldemortX avatar Jul 08 '22 00:07 voldemortX

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.

MehdiAlilou avatar Jul 08 '22 01:07 MehdiAlilou

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

voldemortX avatar Jul 08 '22 01:07 voldemortX

Thank you very much.

MehdiAlilou avatar Jul 08 '22 03:07 MehdiAlilou

@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

voldemortX avatar Jul 08 '22 05:07 voldemortX

@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?

MehdiAlilou avatar Jul 08 '22 05:07 MehdiAlilou

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.

voldemortX avatar Jul 08 '22 05:07 voldemortX

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

MehdiAlilou avatar Jul 08 '22 05:07 MehdiAlilou

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

voldemortX avatar Apr 01 '23 03:04 voldemortX