1

I want to download the model from roboflow https://universe.roboflow.com/rookeye/thesis-iklwo/model/3

Is there anyway to download the model as tflite?

1 Answer 1

0

When you train model using Roboflow platform models are exported to onnx format, and that is what you can get on your local hard drive if you run your model locally. Install inference package (preferably activate your venv and then pip install inference) before running below sample.

import os
# important, either set this env like this or export in your terminal before running the script
os.environ["MODEL_CACHE_DIR"] = "./models_cache"

from inference.models.utils import get_model

model_id = "thesis-iklwo/3"

model = get_model(model_id=model_id, api_key="<your API key>")

models_cache should be created in your current directory, with folders structure like below:

find models_cache
models_cache/
models_cache/thesis-iklwo
models_cache/thesis-iklwo/3
models_cache/thesis-iklwo/3/model_type.json
models_cache/thesis-iklwo/3/class_names.txt
models_cache/thesis-iklwo/3/weights.onnx
models_cache/thesis-iklwo/3/environment.json

Disclaimer: you cannot rely on this feature not to be changed since it's not part of official interface and therefore may be subject of change in the future.

Not the answer you're looking for? Browse other questions tagged or ask your own question.