View source: R/setup_and_classify.R
setup_and_classify
is designed to be a simpler option for setting up and using MLWIC
to classify images for those uers who are less comfortable in computing. It requires fewer steps,
but also loses some of the flexibility associated with the functions it replaces (setup
,
make_input
, classify
, and make_output
). This function will work with either
the species model or the empty/animal model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | setup_and_classify(
python_loc = "/anaconda3/bin/",
conda_loc = "auto",
already_downloaded_model = FALSE,
tensorflow_installed = FALSE,
MLWIC2_already_setup = FALSE,
model_dir = getwd(),
os = c("Mac", "Windows", "Ubuntu"),
model_type = c("species", "empty_animal"),
input_file = NULL,
directory = getwd(),
path_prefix = getwd(),
image_file_suffixes = c(".jpg", ".JPG"),
recursive = TRUE,
images_classified = FALSE,
output_location = getwd(),
output_name = "MLWIC2_output.csv",
shiny = FALSE,
print_cmd = FALSE
)
|
python_loc |
The location of python on your machine. If you are using a Macintosh, the default is the likely location. |
conda_loc |
The location of conda. It is usually in the same folder as python |
already_downloaded_model |
logical. If TRUE, you have already downloaded the model and will specify its location as 'model_dir'. |
tensorflow_installed |
logical. If TRUE, you have already downloaded tensorflow on your machine |
MLWIC2_already_setup |
logical. If TRUE, you have already setup MLWIC. |
model_dir |
Absolute path to the location where you stored the trained folder that you downloaded from github. If you specified 'already_downloaded_model=TRUE', then this is the location where you stored the trained model folder. |
os |
The operating system on your computer. Options are "Mac", "Windows", "Ubuntu". |
model_type |
Do you want the model to ID species ('species') or just determine if images are empty or containing animals ('empty_animal')? |
input_file |
The name of your input csv. It must contain a column called "filename" and unless you are using the built in model, a column called "class" (which would be your species or group of species). If you don't know what is in your images, it is easiest to not have in 'input_file' and to specify 'images_classified == FALSE'. |
directory |
The directory of your 'input_file'. |
path_prefix |
Path to where your images are stored. You need to specify this if you want MLWIC2 to 'find_file_names'. |
image_file_suffixes |
The suffix for your image files. Only specify this if you are using the 'find_file_names' option. The default is .jpg files. This is case-sensitive. |
images_classified |
logical. If TRUE, you have classifications to go along with these images (and you want to test how the model performs on these images). |
output_name |
Desired name of the output file. It must end in '.csv' |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.