Animl comprises a variety of machine learning tools for analyzing ecological data. The package includes a set of functions to classify subjects within camera trap field data and can handle both images and videos.
MIT License
19
stars
5
forks
source link
Create a script to generate csv file with training data information #42
Adds a python script that generates a CSV file containing information about image files needed to train a model. Takes in an input path and an output path. Walks through the input path and finds all jpg files, and creates a csv file within the output path containing a row for each file with the following columns: species, path_to_file, and file_name.
Tested this code by generating the output file, containing ~54,000 rows. Here are a few sample rows:
species
path_to_file
file_name
Andean Guan
/Volumes/Training Data - Peru/Peru Highlands/SpeciesImagesQuispicanchi/Birds/AndeanGuan_Penelope_montagnii/4/Tambo_2000_20100129_161423_Andean Guan.jpg
Tambo_2000_20100129_161423_Andean Guan.jpg
Andean Guan
/Volumes/Training Data - Peru/Peru Highlands/SpeciesImagesQuispicanchi/Birds/AndeanGuan_Penelope_montagnii/4/Tambo_2000_20100129_161428_Andean Guan.jpg
Tambo_2000_20100129_161428_Andean Guan.jpg
Andean Guan
/Volumes/Training Data - Peru/Peru Highlands/SpeciesImagesQuispicanchi/Birds/AndeanGuan_Penelope_montagnii/4/Tambo_2000_20100129_161430_Andean Guan.jpg
Tambo_2000_20100129_161430_Andean Guan.jpg
Andean Guan
/Volumes/Training Data - Peru/Peru Highlands/SpeciesImagesQuispicanchi/Birds/AndeanGuan_Penelope_montagnii/4/Tambo_2000_20100129_161429_Andean Guan.jpg
Adds a python script that generates a CSV file containing information about image files needed to train a model. Takes in an input path and an output path. Walks through the input path and finds all jpg files, and creates a csv file within the output path containing a row for each file with the following columns: species, path_to_file, and file_name.