This repository contains Python scripts for batch processing images with the Pastec image recognition engine. These scripts allow you to:
- Add images to the Pastec index in batches (
pastec-batch-index-add.py) - Search for similar images in the Pastec index (
pastec-batch-index-search.py)
- Python 3.6 or higher
- Required Python packages:
aiohttp,asyncio - A running Pastec server (default: http://localhost:4212)
- A CSV file containing image information
- Image files organized in a folder structure
- Prepare your CSV file with image information (see
images.csvfor an example) - Update the
BASE_PATHconstant in the scripts to point to your image directory - Run the indexing script to add images to the Pastec index:
python pastec-batch-index-add.py
- Run the search script to find similar images:
python pastec-batch-index-search.py
- For detailed information about the indexing script, see pastec-batch-add-README.md
- For detailed information about the search script, see pastec-batch-search-README.md
- Index your images using
pastec-batch-index-add.py - Search for similar images using
pastec-batch-index-search.py - Analyze the results in the generated CSV files
Both scripts support the following command-line options:
# Run in test mode (process only the first 100 images)
python pastec-batch-index-add.py --testing
# Specify a different CSV file
python pastec-batch-index-add.py --csv my_images.csv
# Specify a different base path
python pastec-batch-index-add.py --base-path /path/to/my/images- The indexing script generates output files in the
Add_logdirectory - The search script generates output files in the
Search_logdirectory