(Functionality of this script is now available also in large image annotation tool in a more user-friendly way, but it requires replacement of Fiji’s ‘Action Bar’ plugin with a new version (if older one (v2.02) is already installed). Details available in ‘large image annotation tool‘ page)
If you have successfully trained your dataset to a certain extent, i.e., over 90% accuracy with test images, and receiving a lower number of false positives, then I may have some good news for you to enrich your current training set.
I have prepared a bash script, it works under Ubuntu 14.04 and requires DIGITS. It first makes detections on image(s) and then converts detections to label files so you can add these new labels and their images to your custom Detectnet/KITTI dataset.
Basically, it applies inference function of DIGITS from command line and (cooperate with a python script) to convert inference results of all images found in a given folder, into label “.txt” files, in another folder. All automatically. All you need is to edit the script first to provide the following;
- Path for folder of test images
- Path for a folder to create individual label “.txt” files for each of above images
- Job-ID (DIGITS) name, in the “jobs” folder found under “digits” folder. Basically name of a job folder
- Label name to create, default is ‘car’. In case you want to modify.
Of course, if your inference results are not perfect, there will be false positives and negatives within label txt files, and these need to be corrected manually. You can use my ALT plugin to evaluate inference results and make corrections if needed. You need to copy the .txt files created by this script into the images folder then use ALT plugin to open images. You will then see/edit the inference results, on image.
The script needs a python code for converting Digits inference output to .csv format, which can be downloaded from here;
And the bash script;
Just extract my bash script and the json2csv python script into the same directory. Edit listlm.sh script to change above parameters and run script with following command:
After execution of the script, you can find the generated .txt annotation files in the folder path you provided within the listlm.sh script.