Skip to content

Commit

Permalink
replace torchvision in Keras notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Idan-BenAmi committed Jul 2, 2024
1 parent 1b85f02 commit 2323018
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tutorials/resources/scripts/prepare_imagenet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
rm -rf imagenet/val
mkdir imagenet/val
tar -xf imagenet/ILSVRC2012_img_val.tar -C imagenet/val
wget https://raw.githubusercontent.com/tensorflow/models/master/research/slim/datasets/imagenet_2012_validation_synset_labels.txt -O imagenet/val/imagenet_2012_validation_synset_labels.txt
cd imagenet/val; find . -name "*.JPEG" | sort > images.txt
cd imagenet/val; function zip34() { while read word3 <&3; do read word4 <&4 ; echo $word3 $word4 ; done }; zip34 3<images.txt 4<imagenet_2012_validation_synset_labels.txt | xargs -n2 -P8 bash -c 'mkdir -p $2; mv $1 $2' argv0
cd imagenet/val; rm *.txt

0 comments on commit 2323018

Please sign in to comment.