Using trained models outside of Supervisely
Models trained in Supervisely can be used as a standalone PyTorch model (or ONNX / TensorRT) outside of the platform. This method completely decouple you from both Supervisely Platform and Supervisely SDK, and you will develop your own code for inference and deployment. It's also important to understand that for each neural network and framework, you'll need to set up an environment and write inference code by yourself, since each model has its own installation instructions and a format of inputs and outputs. But, in many cases, we provide examples of using the model as a standalone PyTorch model. You can find our guidelines in a GitHub repository of the corresponding model. For example, RT-DETRv2 Demo.
Next, we will see how to use a standalone PyTorch model in your code with RT-DETRv2 model.
Quick start (RT-DETRv2 example):
Download your checkpoint and model files from Team Files.
Set up environment: Install requirements manually, or use our pre-built docker image (DockerHub | Dockerfile).
Run inference: Refer to our example scripts of how to load RT-DETRv2 and get predictions:
demo_pytorch.py is a simple example of how to load a PyTorch checkpoint and get predictions. You can use it as a starting point for your own code:
Last updated
Was this helpful?