% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sharkDetectoR.R
\name{classify_image}
\alias{classify_image}
\title{Submit a single image for classification (hierarchical taxonomy)}
\usage{
classify_image(image_path, topk = 1)
}
\arguments{
\item{image_path}{Path to a local image file (JPEG/PNG).}

\item{topk}{Integer ≥ 1: how many taxonomy candidates to return. Default = 1.}
}
\value{
If \code{topk = 1}, a single-row data frame with columns:
  \code{order, family, genus, species, p_order, p_family, p_genus, p_species, joint_score}.  
  If \code{topk > 1}, a data frame of size \code{topk} with those same columns.
}
\description{
Calls the Flask API endpoint `/classify` at \code{http://sharkpulse.cnre.vt.edu}.
Returns a data frame of the predicted taxonomy. If \code{topk = 1}, it returns a single-row
data frame with columns in the order:
\code{order, family, genus, species, p_order, p_family, p_genus, p_species, joint_score}.
If \code{topk > 1}, it returns a data frame of size \code{topk} with columns
\code{order, family, genus, species, p_order, p_family, p_genus, p_species, joint_score},
in that column order.
}
\examples{
\dontrun{
  df1 <- classify_image("shark.jpg", topk = 1)
  print(df1)

  df3 <- classify_image("shark.jpg", topk = 3)
  print(df3)  # Already sorted in desired column order
}
}
