tif files are not loaded
See original GitHub issuefrom Augmentor import Pipeline
from skimage.io import imread
aug = Pipeline(source_directory='./',
output_directory='out')
print(imread('sample.tif'))
aug.apply_current_pipeline('sample.tif')
Let’s try to read a file using scikit-image
to be sure it is valid tiff file, and see how Augmentor
fails:
Initialised with 1 image(s) found in selected directory.
Output directory set to ./out.
[[[3366 2681 1454 4441]
[3248 2588 1490 4039]
[3422 2731 1579 4285]
...,
[3659 3072 1881 7845]
[3733 3154 1954 8042]
[3751 3110 1889 7561]]
[[3357 2647 1488 4480]
[3161 2559 1437 4037]
[3400 2719 1584 4146]
...,
[3645 3124 1882 7944]
[3642 3137 1811 8230]
[3690 3155 1925 7592]]
[[3409 2690 1481 4475]
[3343 2637 1539 4038]
[3444 2764 1626 4112]
...,
[3798 3186 1921 7724]
[3863 3266 2034 8210]
[3662 3080 1836 7586]]
...,
[[3670 3012 1836 5635]
[3654 3005 1810 5861]
[3545 2963 1774 5925]
...,
[3567 2858 1712 6473]
[3706 2971 1852 7023]
[3742 3049 1853 7311]]
[[3677 3031 1837 5715]
[3599 3015 1815 5769]
[3593 2994 1817 5706]
...,
[3620 2938 1757 7244]
[3702 3052 1834 7525]
[3696 3098 1857 7699]]
[[3540 2968 1778 5665]
[3572 2987 1818 5662]
[3549 2952 1805 5710]
...,
[3611 3023 1809 7788]
[3657 3114 1822 7792]
[3717 3168 1896 7859]]]
Traceback (most recent call last):
File "bug.py", line 8, in <module>
aug.apply_current_pipeline('sample.tif')
File "/Users/Arseny/.pyenv/versions/3.6.0/lib/python3.6/site-packages/Augmentor/Pipeline.py", line 268, in apply_current_pipeline
return self._execute(AugmentorImage(os.path.abspath(image_path), None), save_to_disk)
File "/Users/Arseny/.pyenv/versions/3.6.0/lib/python3.6/site-packages/Augmentor/Pipeline.py", line 189, in _execute
image = Image.open(augmentor_image.image_path)
File "/Users/Arseny/.pyenv/versions/3.6.0/lib/python3.6/site-packages/PIL/Image.py", line 2452, in open
% (filename if filename else fp))
OSError: cannot identify image file '/Users/Arseny/dev/kaggle/amzn/sample.tif'
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Why can't I open Tiff files in Windows viewer?
1. Open Default Programs by clicking the Start button, and then clicking Default Programs. · 2. Click the Set your default programs option....
Read more >when importing a TIF image into AutoCAD products
The TIF is either formatted incorrectly or too large. Solution: Try the following: Export the TIF at a lower resolution to test if...
Read more >Error when opening TIF files …. – SEQUATOR TIFF fail… – FAQ
Any tif generated from Sequator won't load in APP at all. But if you open that same tif file with Gimp, click File...
Read more >Failing to open a raster (TIFF) in QGIS - GIS Stack Exchange
Try to get another copy of the file DEMnicaragua.tif and have another try to test if your file is physically corrupted. If that...
Read more >TIFF and TIF Files Explained & How to Open Them - Lifewire
GeoTIFF image files also use the TIF file extension. These are images that store GPS coordinates as metadata with the file, using the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi thanks for pointing this out, I’ll add support for TIFF in the next release hopefully.
Fixed in https://github.com/mdbloice/Augmentor/commit/56dccfc08ac742d03791977b7041ecc646d3173a, PyPI version update to come in the next few days.