You can either transform your annotations to a format that is already used in the project (i.e., CULane, TuSimple or LLAMAS' format) or create a class to load your annotations in a custom format. For the latter, you'll have to:
Implement this "abstract class". Then, save it to the same directory (e.g., lib/datasets/custom_loader.py).
Modify this file to include your loader. That is, import your loader like the others already implemented (e.g., import custom_loader as CustomLoader) and then add an if statement to use your loader (as done for the other loaders).
The dataset variable read in the file in step 2 comes from the config file you'll use for training/testing. Therefore, create a config file that uses your loader by setting the attributes dataset.train.dataset and datasets.test.dataset to the string you put in that if statement (you can use the ones I provide as a basis).
This might be a bit confusing so please let me know if you have any issues.
You can either transform your annotations to a format that is already used in the project (i.e., CULane, TuSimple or LLAMAS' format) or create a class to load your annotations in a custom format. For the latter, you'll have to:
lib/datasets/custom_loader.py
).import custom_loader as CustomLoader
) and then add anif
statement to use your loader (as done for the other loaders).dataset
variable read in the file in step 2 comes from the config file you'll use for training/testing. Therefore, create a config file that uses your loader by setting the attributesdataset.train.dataset
anddatasets.test.dataset
to the string you put in thatif
statement (you can use the ones I provide as a basis).This might be a bit confusing so please let me know if you have any issues.