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.236.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.236-py3-none-any.whl (69.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fsai_vision_utils-0.0.236.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.236.tar.gz
Algorithm Hash digest
SHA256 7a530a34377589ba70172416cd1768ea43a69fb5298f2c8a24954e304c3bad03
MD5 95c80980937384342004e20f2b66ac75
BLAKE2b-256 1d85d2f9f9be058971f5038218961d964f3223f3e3dab3a3c36de9e87e76684b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fsai_vision_utils-0.0.236-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.236-py3-none-any.whl
Algorithm Hash digest
SHA256 3c4b2412824d83e5e54709382c84b1bdb7607588d590b901ae760be8b9b700d3
MD5 7c196d32b8abdeed0047da33b7b2ef04
BLAKE2b-256 459903f5abd04ce5b95e4b306a29bc3fa0ae4ccd70a82d6945c7008bec3423ee

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