ppbrown's picture
Upload crawl.sh with huggingface_hub
e7c8748 verified
Raw
History Blame Contribute Delete
688 Bytes
# default is to download each image, square-crop, and then
# resize to 512x512. Alter SIZE If desired
# "objects" caption is tag style. Alternatively, use one
# of the other files in the jsonl if you like. eg:
# "llava38b", "internlm7b"
#
CAPTION=objects
SIZE=512
# img2dataset is a python module
img2dataset --url_list woman-croppable.jsonl.gz --input_format "jsonl.gz"\
--url_col "url" --caption_col "$CAPTION" --output_format files \
--output_folder pexels-woman-croppable \
--processes_count 4 --thread_count 4 \
--resize_mode center_crop --image_size=$SIZE \
--encode_quality=100 --compute_hash=md5
# compute hash is on to give an ability to cross reference