printprobability / qa-workflow

Quality Assurance testing for the Print & Probability book processing and ingestion pipeline
MIT License
0 stars 0 forks source link

Handle Multi-Image TIFFs in Workflow #23

Open jarmoza opened 9 months ago

jarmoza commented 9 months ago

Multi-Image TIFF files currently break the downscaling part of our workflow for Eynollah line extraction. Multiple files are generated and this confuses the upscale amount calculating in compute_upscale_amount.py causing it to throw an assert over the lines.

 width = original_tif_image.width / downsized_jpg_image.width
    height = original_tif_image.height / downsized_jpg_image.height
    assert math.isclose(width, height, abs_tol=0.1), f"Upscale amount (width={width}, height={height}) is not the same in both dimensions"

A good example of this are images found in the book anon_R11260_wellcome_4_generalhistoryair1692.