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.235.tar.gz (57.5 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.235-py3-none-any.whl (64.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fsai_vision_utils-0.0.235.tar.gz
  • Upload date:
  • Size: 57.5 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.235.tar.gz
Algorithm Hash digest
SHA256 b296ab4a97161737f30f3c578b60b1767863ee60ce14b008e97a848ab3a9a4d6
MD5 189f0c8d56e5f79e541018203bd23db3
BLAKE2b-256 3901884d1bcae5d31cd3d17d71a012b1e91b9254485b1dd8774248dc63808711

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fsai_vision_utils-0.0.235-py3-none-any.whl
  • Upload date:
  • Size: 64.7 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.235-py3-none-any.whl
Algorithm Hash digest
SHA256 35d7d5b0feb49b05478696cd32b147cff56b72100055308168f3afc33b0805ec
MD5 07b51706c896384444cc2e3d8a63a52a
BLAKE2b-256 9420489ab643df95078c225dae77d1d322b5bcd39ab6627a55a4c0be2c1a458d

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