beelabhmc / flower_map

Automated flower species classification for generating honey-bee foraging maps
MIT License
4 stars 2 forks source link

TIFF file size exceeded #13

Open elissahou opened 3 years ago

elissahou commented 3 years ago

(seems to be related to this)

libtiff error: Maximum TIFF file size exceeded libtiff error: Maximum TIFF file size exceeded Traceback (most recent call last): File "scripts/export_ortho.py", line 25, in chunk.exportOrthomosaic(args.out) RuntimeError: TIFFWriteTile: unexpected error: out/6217West/stitch-lowQual/ortho.tiff

aryarm commented 3 years ago

@elissahou According to that link, Agisoft fixed this bug in Metashape 1.6.3

You can upgrade to Metashape 1.6 by replacing this line in the default.yml file:

-    - http://download.agisoft.com/Metashape-1.5.5-cp35.cp36.cp37-abi3-linux_x86_64.whl
+    - http://download.agisoft.com/Metashape-1.6.5-cp35.cp36.cp37-abi3-linux_x86_64.whl

(And, I'm guessing you might also need to activate Metashape again.)

Since the jump from Metashape 1.5 to Metashape 1.6 is a breaking change, it's likely that some of the functions (or their parameters) in the Metashape API will have changed, thereby breaking our scripts. A full list of these changes is available in their change log.

So if you decide to update to Metashape 1.6, you will probably also have to update all of the scripts that use the Metashape API to ensure they are still using the API correctly. And then, you will probably have to run it on the small, test2 dataset again to make sure the scripts still work. I think stitch.py will be the only script to give you any trouble, but I'm available to help if you need me!

aryarm commented 3 years ago

Update I am not the original author of the stitch.py script. I actually just adapted it from here. It looks like the original author added support for Metashape 1.6, so you could probably just use their code as a reference. You can use the unix diff command or the git diff command to see what part of the code in stitch.py is stuff I added.

aryarm commented 3 years ago

For anyone else stumbling upon this issue, it might also be possible to use just Metashape 1.6 for the export_ortho rule and forego updating the scripts in other rules. We would have to create a separate conda environment file just for that rule, so that Snakemake can be instructed to use the proper version of Metashape there.

Just a cautionary note that I don't know how the licensing will work in that case, but it might be worth a try.