Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3 paths in url_list are not supported #419

Open
BennySemyonovAB opened this issue Apr 10, 2024 · 1 comment
Open

s3 paths in url_list are not supported #419

BennySemyonovAB opened this issue Apr 10, 2024 · 1 comment

Comments

@BennySemyonovAB
Copy link

Hi, im trying to use the tool, i have url_list with s3://some-bucket/path each line(around 2 million lines like that) and i get the error:
urlopen error unknown url type: s3

trying to understand what i have done wrong as i saw that s3 should be supported with s3fs and fsspec but cant manage to understand whats going wrong, help will be appreciated thx! 🙂

@BennySemyonovAB
Copy link
Author

BennySemyonovAB commented Apr 10, 2024

from img2dataset import download
import shutil
import os

if __name__ == "__main__":
    output_dir = os.path.abspath("/hood/bennys/random-files/256_images_parquet")

    if os.path.exists(output_dir):
        shutil.rmtree(output_dir)

    download(
        processes_count=100,
        thread_count=256,
        url_list="/hood/bennys/random-files/image_list.txt",
        output_folder=output_dir,
        resize_mode="no",
        encode_format="png",
        skip_reencode=True,
        output_format="parquet",
        input_format="txt",
        disable_all_reencoding=True,
        distributor="multiprocessing",
        encode_quality=0,
    )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant