Skip to content

Commit

Permalink
Merge pull request #475 from IshanG97/download-data-bat-script
Browse files Browse the repository at this point in the history
Fix issue #474: Windows .bat setup script
  • Loading branch information
milesial committed Feb 11, 2024
2 parents de41eaa + c478dc9 commit 21d7850
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions scripts/download_data.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@echo off
setlocal enabledelayedexpansion

if not exist "%userprofile%\.kaggle\kaggle.json" (
set /p USERNAME=Kaggle username:
echo.
set /p APIKEY=Kaggle API key:

mkdir "%userprofile%\.kaggle"
echo {"username":"!USERNAME!","key":"!APIKEY!"} > "%userprofile%\.kaggle\kaggle.json"
attrib +R "%userprofile%\.kaggle\kaggle.json"
)

pip install kaggle --upgrade

kaggle competitions download -c carvana-image-masking-challenge -f train_hq.zip
powershell Expand-Archive train_hq.zip -DestinationPath data\imgs
move data\imgs\train_hq\* data\imgs\
rmdir /s /q data\imgs\train_hq
del /q train_hq.zip

kaggle competitions download -c carvana-image-masking-challenge -f train_masks.zip
powershell Expand-Archive train_masks.zip -DestinationPath data\masks
move data\masks\train_masks\* data\masks\
rmdir /s /q data\masks\train_masks
del /q train_masks.zip

exit /b 0

0 comments on commit 21d7850

Please sign in to comment.