Prediction
DeepForest allows the prediction of the new data with the prebuilt model or we can also use our custom trained models.
Predict a single image
DeepForest allows to predict single images with predict_image function which can read an image from memory or file provided by user, which returns the bounding boxes of the predicted trees in image.
The current DeepForest has release model there is a category named "Tree", which has the label as numeric 0 and there is also a bird release model which has the label as numeric 1.
Predict a tile
Large tiles covering large geographic areas will not fit in memory during prediction, and results will be poor due to the density of bounding boxes. Remote sensing data is typically provided as a geospatial .tif file and is best suited for the predict_tile function, which divides the tile into overlapping windows, performs predictions on each window, and reassembles the resulting annotations.
Predict a set of annotations
When evaluating ground truth data, it is helpful to predict a sequence of images and combine them into a data frame. The predict_generator method allows the user to point to an annotated file and return predictions for all images. The image path is a relative path to the root dir. What we generally do is save the .csv file alongside the images.
We can also customize the appeaance of bounding box created like color and thickness by providing these arguments a value while calling predict_image function.
Comments
Post a Comment