This is the Python package for accessing the Dymaxion Labs Platform.
The Dymaxion Labs Platform allows you:
- Download and upload satellite and drone images.
- Train machine learning models for object detection, segmentation, change detection, and more.
- Work your data using a REST API and Python.
This is a publicly installable package. However, if you want access to our full Platform, you will need to create a Dymaxion Labs account.
Install the latest client package via pip:
pip install dymaxionlabs
Sing up at https://app.dymaxionlabs.com/signup if you don’t have a user yet, otherwise log in.
When entering the first time, you will be asked to create a new Project. After nameing your project you will enter the main dashboard. Take note of your Project Id.
Now enter the API Key section, create a new API key and copy the generated key.
You need to set both keys as environment variables, like this:
export DYM_API_KEY=... export DYM_PROJECT_ID=...
You can also do this from Python:
import os os.environ["DYM_API_KEY"] = "insert-api-key" os.environ["DYM_PROJECT_ID"] = "insert-project-id"
From now on, you have full access to the Dymaxion Labs API from Python.
To use your models for predicting, you have to know their UUID.
You can obtain this by visiting the models page:
Click on the Edit button of your model, then on Show UUID menu option. Copy
this and pass it as parameter to the
You can predict objects in local images. For example, if you have
import time from dymaxionlabs.models import Estimator model = Estimator('b4676699-27c8-4193-a24c-cffaf88cce92') job = model.predict_files(local_files=['./img.jpg']) # Wait for results while not job.status(): print("Waiting for results...") time.sleep(60) # Download results to ./results directory (will be created if not exists) job.download_results("./results")
or use previously uploaded files (remote)
import time from dymaxionlabs.models import Estimator, Project project = Project() files = project.files() first_file = files model = Estimator('b4676699-27c8-4193-a24c-cffaf88cce92') job = model.predict_files(remote_files=[first_file.name]) # Wait for results while not job.status(): print("Waiting for seconds results...") time.sleep(60) # Download results to ./results directory (will be created if not exists) job.download_results("./results")