Metadata: how to add a taxon name that is picked up by iNat on upload?

On the video tutorial for uploading obs, the presenter mentions that the taxon name was taken from the metadata. How does one include it in the metadata/exif? And can one include other things like Life Stage or Habitat? Or other stuff for iNat fields or annotations? 'Twould be fabby dabby doo if I could do that all offline and have iNat read it when I upload :-D

2 Likes

hereā€™s what @er1kksen described in another thread: https://forum.inaturalist.org/t/geotagging-photos/66/39. maybe he can describe his process in more detail, if you need it. he talks about using darktable, but I assume you could use Lightroom to do the same thing. (iā€™ve never tried doing this myself.)

Oh super, thank you pisum :-)

I have Darktable, but I havenā€™t used it much. I find for exif, batch renaming etc. that gThumb (on Linux) does all I need, and does it fast and perfectly (except batch resizing, which I do with Irfanview on Win). gThumb can also add metadata, but I donā€™t know what metadata/exif I need to add for the taxon name to end up in the right field on iNat.

Can you help me please, @er1kksen ?

I use exiftool to put the botanical name into the Subject field of the exif. I experimented with an image to see what iNat picked up.

Sorry, that should be 'scientific name". I was reading my R code.

1 Like

Thanks, Ruth. I have exiftool. Would the command then be:

exiftool -Subject=ā€œTaxon nameā€ image.jpg

If so, this would take me longer than doing it on iNat! My file names are date-time-MM-image_number. So writing each one out would take me forever!

I do some work myself (in R) to create the exiftool command. My species and genus are in hierarchical keywords on the image exported from Lightroom, but the complete name is in a spreadsheet. To save reconstructing the taxon name, I match with my spreadsheet on image name, collect the taxon name and construct an exiftool command to remove the exif fields I donā€™t want and add the correct name in the Subject field. And then run the exiftool command. I do a directory at a time. Much quicker than adding all the names after uploading.

1 Like

Oh, please tell me how to do this!

Also, is there a way of stripping all metadata/exif except DateTimeOriginal (and the Subject). I have tried doing this with exiftool but it strips everything except the file size. {But when I went looking for the command I used, I found something else! Will try that and see if it works - it looks like this - exiftool -all= -tagsFromFile @ -*date* *.jpg}

Where are your taxon names?

Er, in my head. I add the name or an abbreviation to the photo names, but I donā€™t have a list anywhere.

If you have the name somewhere ā€˜regularā€™ in the photo name, eg ā€˜characters 20 onwards ignoring the extensionā€™, you could extract that and add it to the exif, using any scripting language. I use R for such things because I know it, but you may know some other.

Yes, the names are always at the same place in the photo name. Two problems: (1) sometimes (often) I donā€™t know what the name is, so I put in a description, and (2) I donā€™t know any scripting languages that could help hereā€¦

I need to learn!

Your description is unlikely to match a taxon name in iNat, so will probably just be recorded as a tag and ignored for id. I can give you some code in R and tell you how to run it if you tell me the exact position in the name that you want extracted.

Okay, I have 2 cameras and I name the photos with one extra character for the one camera. So my photo names are:

2016_03_23 10_43_04_MM_25595 Penaea mucronata.JPG
and
2016_03_23 10_45_40_MM_X10056 acid sand fynbos.JPG

Oo, and Iā€™ve just remembered that I changed the naming a bit a couple of years ago, so I also have (which is another extra character):

2019-05-05ā€“20.37.33 MM 34441 pyralid.JPG
and
2019-05-01ā€“08.27.43 MM X16651 cattle egrets.JPG

Iā€™m not intending changing the naming again.
Iā€™ve just noticed that when I paste the names here, the dash-dash gets changed to a single hyphen. The dash-dash is between the date and the time on the second set of names - donā€™t know how R will read that?

I forsee problems due to embedded spaces but it might be possible. It looks at though you could extract from the .JPG backwards to the first numeric character. Or, maybe easier, if there is an X, get characters 32 to 4 before the end, otherwise 31 to 4 before the end. Iā€™ll see what I can do.

I have the basics working on my Mac. Do you have R yet? And have you tested the exiftool command to remove most of the exif?

One further question - are all the image numbers 5 digits long?

It sounds like you two have it worked out pretty well but I wanted to add some other tools for people who donā€™t use R or Linux and read this thread later.

iNat uploader will pick up the finest detail taxon from the keywords, so species first, then genus if no species tag, family if no genus tag, and so on. If you have several keywords at the same level (i.e. species) it will pick the first alphabetically.

I use Picasa (formerly a Google tool, now deprecated but you can get copies from download sites) to add keyword tags for species/genera/orders/etc. Keyword tags can also be edited by many other photo processing programs like Darktable, Lightroom, Exposure, FashPhotoTagger (free), PhotoME (free). You can also set keywords directly in Window Explorer by turning on the details pane, though this method is slow because you canā€™t save commonly used keywords.

It wonā€™t matter to iNat uploading but I also add keywords for special places, project names, and special status species (like endangered species). That way I can quickly find all of my threatened plant photos from Ash Meadows Wildlife refuge for example.

2 Likes

The numbers are all 5 digits.

I donā€™t think I have R yet. It is very difficult to search for a program with only one letter! My package manager has r-base-core which seems to be the right thing? {There are a few others including r-cran-mass which has the description ā€œGNU R package of Venables and Ripleyā€™s MASSā€ :-D}. I can install r-base-core very easily. But then I donā€™t know how to go about using it.

I have not had time to test the exiftool command yet, no. Will try to get to that todayā€¦

Oh, and I suppose I should mention Iā€™m on Ubuntu Studio 18.10.

R-base-core is what you need. Then you run R in a terminal by typing R
I tried your exiftool command and it strips most things. exiftool will create backups by default so all is not lost if it does not do what you want. I canā€™t work out how to attach a file to this message, and you will probably need a little help with running it. I will message you with my email address - please email me.