forked from activeloopai/deeplake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request activeloopai#777 from activeloopai/feature/supervi…
…sely Add supervisely integration
- Loading branch information
Showing
7 changed files
with
424 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Supervisely | ||
|
||
## Dataset to Supervisely Project | ||
Here is an example of a conversion of the dataset into Supervisely format. | ||
|
||
```python | ||
from hub import Dataset, schema | ||
|
||
# Create dataset | ||
ds = Dataset( | ||
"./dataset", | ||
shape=(64,), | ||
schema={ | ||
"image": schema.Image((512, 512, 3)), | ||
}, | ||
) | ||
|
||
# transform into Supervisely project | ||
project = ds.to_supervisely("sample-project") | ||
``` | ||
|
||
## Supervisely Project to Dataset | ||
In this manner, Hub dataset can be created from a supervisely project: | ||
|
||
```python | ||
import hub | ||
|
||
out_ds = hub.Dataset.from_supervisely("sample-project") | ||
res_ds = out_ds.store("./dataset") | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.