Avoid download 256 resolution images

#6
by DyrusQZ - opened

The default download resolution of download.py is 256, try set image_size=4096 and resize_only_if_bigger as True. This will download the original image if the short side of image is less than 4096 pixels and resize to 4096 if the short side is bigger.

            download(
            image_size=4096,
            processes_count=16,
            thread_count=64,
            url_list=os.path.join(parquet_dir, parquet_files_i),
            resize_mode="keep_ratio", 
            resize_only_if_bigger=True,
            output_folder=os.path.join(log_dir, parquet_files_i.split('.')[0]),
            output_format="files", # FIXED
            input_format="parquet",
            url_col="url",
            output_path_col="path",
            number_sample_per_shard=1000,
            retries=3,
            distributor="multiprocessing",
             )

Sign up or log in to comment