Skip to main content

Helper functions for vision processing.

Project description

fsai-vision-utils

Vision utility functions and tools for batch processing and data management.

Installation

poetry add fsai-vision-utils

Tools

AWS Batch Download Tool

Download multiple files from S3 using file IDs with multi-threading and retry logic.

Usage

python -m fsai_vision_utils.clis.aws_batch_download \
    --ids_txt_file ids.txt \
    --aws_path s3://bucket/folder \
    --output_path ./images

Arguments

Argument Required Default Description
--ids_txt_file Yes - Text file with file IDs (one per line)
--aws_path Yes - S3 base path (e.g., s3://bucket/folder)
--output_path Yes - Local output directory
--file_extension No jpg File extension to download
--max_workers No 50 Number of concurrent downloads
--max_retries No 3 Retry attempts per file
--log_level No INFO Logging level

Input Format

Create a text file with one file ID per line:

image_001
image_002
image_003

The tool downloads: {aws_path}/{file_id}.{file_extension}

Examples

Basic download:

python -m fsai_vision_utils.clis.aws_batch_download \
    --ids_txt_file image_ids.txt \
    --aws_path s3://my-bucket/images \
    --output_path ./images

Custom settings:

python -m fsai_vision_utils.clis.aws_batch_download \
    --ids_txt_file image_ids.txt \
    --aws_path s3://my-bucket/images \
    --output_path ./images \
    --file_extension png \
    --max_workers 100

Features

  • Multi-threaded downloads (configurable workers)
  • Automatic retry with exponential backoff
  • Skips already downloaded files
  • Progress tracking and statistics
  • Graceful shutdown (Ctrl+C)
  • Comprehensive logging

Requirements

  • AWS CLI installed and configured
  • Valid AWS credentials with S3 read access

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fsai_vision_utils-0.0.237.tar.gz (61.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fsai_vision_utils-0.0.237-py3-none-any.whl (69.6 kB view details)

Uploaded Python 3

File details

Details for the file fsai_vision_utils-0.0.237.tar.gz.

File metadata

  • Download URL: fsai_vision_utils-0.0.237.tar.gz
  • Upload date:
  • Size: 61.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.3 Linux/6.11.0-1018-azure

File hashes

Hashes for fsai_vision_utils-0.0.237.tar.gz
Algorithm Hash digest
SHA256 0ac54f4ab0a65edf595277c48888b7aa70edaa8dd10f0b7a7fd7ac9254e872d9
MD5 746f1556065debfce587c661a64ab09e
BLAKE2b-256 ef34d2857b76f154d3cf0aba3e2b20965d1bc1045750e6d56d74ddc7280b2308

See more details on using hashes here.

File details

Details for the file fsai_vision_utils-0.0.237-py3-none-any.whl.

File metadata

  • Download URL: fsai_vision_utils-0.0.237-py3-none-any.whl
  • Upload date:
  • Size: 69.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.3 Linux/6.11.0-1018-azure

File hashes

Hashes for fsai_vision_utils-0.0.237-py3-none-any.whl
Algorithm Hash digest
SHA256 488f6516cf404359a4fac0de9c6c89bfb8ee76d50f2f2a2f8edb642c612dfb4a
MD5 3617b92e75eb008f7744a7a9cbe3eb67
BLAKE2b-256 9d29ad22f39da1ab82cdf0b51306c81a5a24af2bf7b15ba876aa9bcf5ae6a64d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page