Overview
This tutorial provides guidance on how to create a custom Supervisely import application.
We advise reading our from script to supervisely app guide if you are unfamiliar with the file structure of a Supervisely app repository because it addresses the majority of the potential questions.
We recommend to use import template for creating custom import applications using class sly.app.Import
from Supervisely SDK. It is the easiest way to create import app with convenient GUI and designed to speed up and simplify the development of import apps.
However, if your use case is not covered by our import template, you can create your own app from scratch without the template using basic methods and widgets from Supervisely SDK.
sly.app.Import
advantages
sly.app.Import
advantagessly.app.Import
class will handle boilerplate/routine operations for you:
โ Check that the selected team, workspace, project or dataset exists and that you have access to it
โฌ๏ธ Download your data from the Supervisely platform to a remote container or local hard drive if you are debugging your app
๐ช Automatically detect app context with all required information for creating import app
โฌ๏ธ Upload result data to new or existing Supervisely project or dataset
๐งน Remove source directory from Team Files after successful import
Simply inherit from sly.app.Import
and implement the process
method.
sly.app.Import
has a Context
subclass which contains all required information that you need for importing your data from the Supervisely platform. You can read about context
in this section.
Set up an environment for the development
Follow the steps below:
Step 1. Prepare ~/supervisely.env
file with credentials. Learn more here.
Step 2. Fork and clone the repository with source code and create Virtual Environment.
for import with template:
Step 3. Open the repository directory in Visual Studio Code.
Step 4. Select created virtual environment as a Python interpreter.
How to run it in Supervisely
Submitting an app to the Supervisely Ecosystem isnโt as simple as pushing code to the GitHub repository, but itโs not as complicated as you may think of it either.
Please follow this link for instructions on adding your app. We have produced a step-by-step guide on how to add your application to the Supervisely Ecosystem.
Last updated