ppbrown commited on
Commit
e7c8748
·
verified ·
1 Parent(s): 14a2185

Upload crawl.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. crawl.sh +20 -0
crawl.sh ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # default is to download each image, square-crop, and then
3
+ # resize to 512x512. Alter SIZE If desired
4
+
5
+ # "objects" caption is tag style. Alternatively, use one
6
+ # of the other files in the jsonl if you like. eg:
7
+ # "llava38b", "internlm7b"
8
+ #
9
+ CAPTION=objects
10
+ SIZE=512
11
+
12
+ # img2dataset is a python module
13
+ img2dataset --url_list woman-croppable.jsonl.gz --input_format "jsonl.gz"\
14
+ --url_col "url" --caption_col "$CAPTION" --output_format files \
15
+ --output_folder pexels-woman-croppable \
16
+ --processes_count 4 --thread_count 4 \
17
+ --resize_mode center_crop --image_size=$SIZE \
18
+ --encode_quality=100 --compute_hash=md5
19
+
20
+ # compute hash is on to give an ability to cross reference