Happy New Year dear blog friends! Welcome to the first tip of 2020! Today we’re showing you a rather hidden functionality of Amped Authenticate: the possibility of loading and processing images using the command line interface! It’s something that comes pretty handy when you have to deal with a lot of files and want to save hundreds of clicks… keep reading to find out more!
Those who’ve been working with a computer for several years probably know some rudiments of batch scripting. At least, they’ve probably had one friend who loved doing everything from the command line. Perhaps, thanks to movies, when a normal human sees you using the command line, you are automatically considered to be a computer geek, maybe a hacker, surely someone who can speak the same language of the computer… all of this just because you can write something like:
C:> dir -l *.*
(… and no, *.* is not an emoticon). Of course, most people find editing text with vim rather less comfortable than using a more graphical solution such as Notepad… and we can’t blame them, honestly. Nevertheless, sometimes the possibility of issuing commands through the command line can be a game-changer, especially when you are in one of these situations:
- You need to execute the same operation on many, many files;
- You need to integrate the execution of some command within a larger, possible automated process (e.g., a workflow that copies all files from a drive to a local folder, then extracts metadata from all images, select only those from a specific model and run some authentication filters on each of them).
In cases like those above, the Graphical User Interface (GUI) rapidly becomes your enemy instead of your ally, because what you need is speed and automation, not user-friendly buttons.
That is why Amped Authenticate offers you a Command Line Interface (CLI), whose usage is fully documented in the program reference manual. For example, if you open a terminal and run this command:
authenticate.exe /i "C:\inputfolder\image.jpg" /o "C:\outputfolder\report.tsv"
Authenticate will fire up, open file C:\inputfolder\image.jpg, run all filters on it and store the output in Tab Separated Values (TSV) format in file C:\outputfolder\report.tsv. In this example we used TSV as the output extension because it’s normally easier to process for a script (check out our recent tip on this topic); but if you prefer a more human-friendly HTML report, just replace “.tsv” with “.html” in the command above.
You may even choose to run a subset of filters on your image, to speed up the process and limit the output size. To do so, first, create your customized set of filter configurations (as explained here), then save it to a “myCustomConfig.aas” file and add it to the command above:
authenticate.exe /i "C:\inputfolder\image.jpg" /s "C:\myCustomConfig.aas" /o "C:\outputfolder\report.tsv"
But, probably, the two coolest things you can do with Authenticate CLI are related to automated screening of images. If you run this command:
authenticate.exe /i "C:\inputfolder" /k “C:\outputfolder\ok” /w “C:\outputfolder\warning” /b
Authenticate will execute solely the File Format filter on all images in the folder “C:\inputfolder” and will move images that passed all tests to folder “C:\outputfolder\ok”, while images having at least one suspicious metadata/property will be moved to folder “C:\outputfolder\warning”. This is a great way to make a first screening based on the lightning-fast File Format filter.
Another great possibility is to use the CLI to run the Smart Report tool on a folder. The Smart Report will not only run the File Format filter on all images, but it will also run an automatically selected subset of Local Analysis filters on all images with suspicious metadata. It’s the recommended option when you have to deal with many images and you just can’t focus the attention on all of them. You can find more about the Smart Report here. For the sake of this tip, we just need to show how easy it is to run it from the command line:
authenticate.exe /i "C:\inputfolder" /o “C:\outputfolder\report.tsv” /r
Once again, we used TSV in the example, but you can choose the very nice HTML report if the next step requires a human inspection of the results.
Before we say goodbye, let us clarify one thing: in all examples above we’ve written “authenticate.exe” at the beginning of each command, but you’d normally want to replace that with the full path to Authenticate’s executable, which by default is:
C:\Program Files (x86)\Amped Authenticate\bin64\authenticate.exe
… and of course, we do not recommend creating folders like “C:\inputfolder”, they’re just examples to keep commands short. You’d normally work with folders under your User folder, such as:
Of course, we don’t expect this tip to make Amped Authenticate’s CLI your favorite way to interact with our software… we just hope that you keep in mind this option, just in case you need it one day!
That’s all for today! We hope you’ve found this issue of the Video Evidence Pitfalls series interesting and useful! Stay tuned and don’t miss the next ones. You can also follow us on LinkedIn, YouTube, Twitter, and Facebook: we’ll post a link to every new tip so you won’t miss any!