Last active
March 9, 2019 05:06
-
-
Save arturojain/5e43c17bbf1f11308333b64da5e01d84 to your computer and use it in GitHub Desktop.
Script to preprocess images to 224 by 224 pixels for ML
This file contains hidden or 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
# Example usage: | |
# ./pre-processing.sh <path-to-dir-with-jpg-images> | |
#!/bin/bash | |
output=$1"/" | |
res="224:224" | |
for j in $(ls -C1 "$output") | |
do | |
ffmpeg -i "$output"/"$j" -vf scale=$res "$output"/"$res"_"$j" | |
rm "$output"/"$j" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment