Skip to content

Instantly share code, notes, and snippets.

@sadimanna
Last active June 9, 2023 17:46
Show Gist options
  • Save sadimanna/7da8feca98c74aea372f119aa2486317 to your computer and use it in GitHub Desktop.
Save sadimanna/7da8feca98c74aea372f119aa2486317 to your computer and use it in GitHub Desktop.
REM Set the paths for Folder A, train folder, val folder, and test folder
set "mask_folder_path=%base_path%\annotations\trimaps"
set "train_mask_path=%base_path%\train_masks"
REM Create the target folder if it doesn't exist
mkdir "%train_mask_path%"
set "extension=.EXT"
REM Move label files from the label folder to the train folder based on file names
for %%F in ("%train_image_path%\*") do (
set "file_name=%%~nF"
move "%mask_folder_path%\!file_name!%extension%" "%train_mask_path%\"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment