After this update, layout-parser will provide more flexible ways of initializing the models and specifying the model configs:
New AutoLayoutModel class that supports the convenient loading of the models from different backends. There are several different ways of specifying the models:
AutoLayoutModel("lp://<detector-name>/<dataset-name>/<model-arch>/config") will create a model of the <detector-name> backed using the "lp://<dataset-name>/<model-arch>/config".
AutoLayoutModel("lp://<detector-name>/<dataset-name>/<model-arch>") is more concise: it works the same as the command above, while you don't need to specify the config in the input.
AutoLayoutModel("lp://<detector-name>/<dataset-name>") will automatically find the corresponding <model-arch> for you as long as there are models trained for this dataset.
After this update, layout-parser will provide more flexible ways of initializing the models and specifying the model configs:
New
AutoLayoutModel
class that supports the convenient loading of the models from different backends. There are several different ways of specifying the models:AutoLayoutModel("lp://<detector-name>/<dataset-name>/<model-arch>/config")
will create a model of the<detector-name>
backed using the"lp://<dataset-name>/<model-arch>/config"
.AutoLayoutModel("lp://<detector-name>/<dataset-name>/<model-arch>")
is more concise: it works the same as the command above, while you don't need to specify theconfig
in the input.AutoLayoutModel("lp://<detector-name>/<dataset-name>")
will automatically find the corresponding<model-arch>
for you as long as there are models trained for this dataset.Here are some examples:
lp.AutoLayoutModel("lp://efficientdet/PubLayNet/tf_efficientdet_d0/config")
lp.AutoLayoutModel("lp://efficientdet/PubLayNet/tf_efficientdet_d0")
lp.AutoLayoutModel("lp://efficientdet/PubLayNet")
Similar level of flexibility is also supported for existing
LayoutModel
s:lp.XXLayoutModel("lp://<dataset-name>/<model-arch>/config")
lp.XXLayoutModel("lp://<dataset-name>/<model-arch>")
lp.XXLayoutModel("lp://<dataset-name>")