-
Notifications
You must be signed in to change notification settings - Fork 3
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 #34 from castacks/multi_thread_download
Add support for returning file list and multi-thread download
- Loading branch information
Showing
4 changed files
with
130 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Local | ||
local/ | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
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 @@ | ||
# General imports. | ||
import sys | ||
|
||
# Local imports. | ||
sys.path.append('..') | ||
import tartanair as ta | ||
|
||
# Create a TartanAir object. | ||
tartanair_data_root = '/my/path/to/root/folder/for/tartanair-v2' | ||
|
||
ta.init(tartanair_data_root) | ||
|
||
# Download data from following environments. | ||
env = [ "Prison", | ||
"Ruins", | ||
"UrbanConstruction", | ||
] | ||
|
||
ta.download_multi_thread(env = env, | ||
difficulty = ['easy', 'hard'], | ||
modality = ['image', 'depth'], | ||
camera_name = ['lcam_front', 'lcam_right', 'lcam_back', 'lcam_left', 'lcam_top', 'lcam_bottom'], | ||
unzip = True, | ||
num_workers = 8) | ||
|
||
# To download the entire dataset | ||
alldata = ta.get_all_data() # this fill in all available data for env, difficulty, modality and camera_name | ||
ta.download_multi_thread(**alldata, | ||
unzip = True, | ||
num_workers = 8) |
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