Datasets:
[release] v1.2.1: correct MAMA-MIA and PI-CAI to RAS+, withdraw their v1.2.0; new reproducibility and fast download scripts
dc096c2 | # | |
| # Install medvision_ds so build_dataset.py can run. | |
| # | |
| # ./setup-env.sh /path/to/data-dir | |
| # MedVision_DATA_DIR=/path/to/data-dir ./setup-env.sh | |
| # | |
| # medvision_ds is installed through medvision_bm, which is the documented public route. | |
| # Nothing here is specific to any machine: no absolute paths, no interpreter pinning, no | |
| # credentials. Run it from any checkout. | |
| # | |
| # WHICH medvision_ds YOU INSTALL DECIDES WHAT GETS STAMPED. build_dataset.py names the | |
| # annotation version explicitly when reproducing, so the installed version does not | |
| # affect the filename in that mode -- but it does decide the CODE that computes the | |
| # values. To reproduce a published annotation faithfully you want the released package, | |
| # which is what this script gives you. To build with local modifications, install the | |
| # working tree instead: | |
| # | |
| # pip install -e "<repo>/src" | |
| # | |
| set -euo pipefail | |
| DATA_DIR="${1:-${MedVision_DATA_DIR:-}}" | |
| if [ -z "${DATA_DIR}" ]; then | |
| echo "usage: $(basename "$0") <data-dir> (or export MedVision_DATA_DIR)" >&2 | |
| exit 1 | |
| fi | |
| if python -c "import medvision_ds" 2>/dev/null; then | |
| echo "medvision_ds already installed: $(python -c 'import medvision_ds; print(medvision_ds.__version__)')" | |
| echo "Nothing to do. Uninstall it first if you want a different version." | |
| exit 0 | |
| fi | |
| pip install medvision_bm | |
| python -m medvision_bm.benchmark.install_medvision_ds --data_dir "${DATA_DIR}" | |
| echo | |
| echo "medvision_ds $(python -c 'import medvision_ds; print(medvision_ds.__version__)') installed." | |
| echo "Next: python build_dataset.py --data_dir \"${DATA_DIR}\" --dataset <NAME> --dry_run" | |