Using trained models outside of Supervisely
Last updated
Was this helpful?
Last updated
Was this helpful?
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, .
Next, we will see how to use a standalone PyTorch model in your code with RT-DETRv2 model.
Download your checkpoint and model files from Team Files.
Clone our fork with the model implementation. Alternatively, you can use the original repository, but you may face some unexpected issues if the authors have updated the code.
Set up environment: Install manually, or use our pre-built docker image ( | ).
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: