-
Notifications
You must be signed in to change notification settings - Fork 7
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 #74 from Janelia-Trackathon-2023/3d-benchmark
Extend benchmarks
- Loading branch information
Showing
8 changed files
with
322 additions
and
110 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,37 @@ | ||
import os | ||
import urllib.request | ||
import zipfile | ||
from pathlib import Path | ||
|
||
ROOT_DIR = Path(__file__).resolve().parents[1] | ||
DATASETS = [ | ||
"http://data.celltrackingchallenge.net/training-datasets/Fluo-N2DL-HeLa.zip", | ||
"http://data.celltrackingchallenge.net/training-datasets/PhC-C2DL-PSC.zip", | ||
"http://data.celltrackingchallenge.net/training-datasets/Fluo-N3DH-CE.zip", | ||
] | ||
|
||
|
||
def download_gt_data(url, root_dir): | ||
data_dir = os.path.join(root_dir, "downloads") | ||
|
||
if not os.path.exists(data_dir): | ||
os.mkdir(data_dir) | ||
|
||
filename = url.split("/")[-1] | ||
file_path = os.path.join(data_dir, filename) | ||
|
||
if not os.path.exists(file_path): | ||
urllib.request.urlretrieve(url, file_path) | ||
|
||
# Unzip the data | ||
with zipfile.ZipFile(file_path, "r") as zip_ref: | ||
zip_ref.extractall(data_dir) | ||
|
||
|
||
def main(): | ||
for url in DATASETS: | ||
download_gt_data(url, ROOT_DIR) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
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.