1 2 |
imageName |
path to image to be cropped |
cropNet |
mxnet model for isolating dolphin |
workingImage |
workspace for holding image during processing |
saveDir |
directory to save cropped image |
minXY |
minimum width/height in pixels for valid crop |
target |
label indicating layer representing class |
threshold |
threshold value for triggering a crop |
Function loads image and uses the given neural network to isolate any dorsal fins therin. The neural network returns a matrix whose values range [0,1]. Using a contiguous region algorithm (blob analysis), the x,y range for each excitation on the matrix is found. The range is then rescaled to find the analogous region in the original image. This region is cropped from said image and saved as a jpeg to the given directory.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.