I am trying to use a deep learning approach to recognize and measure the size of elephants tusks. I have a large database with elephant pictures. I understand that, if i would have labelled data, that i could potentially train a deep neural net to classify tusks.

However, would i also be able to use a fully unsupervised approach to "learn" a tusk feature (and especially the contours / borders) of the elephant tusks (e.g. stacked Restricted Boltzmann Machines)? I can imagine that a stacked-RBM might learn a higher-level feature that might represent the elephant tusk. However - i am struggling to see how one would "extract" this feature from the RBM - so that ideally one could use it for further calculations (e.g. to determine the size of each tusk) in each picture? Any intuition or literature references much appreciated!

(picture of elephant included per below for reference)

enter image description here


2 Answers 2


At some stage you're going to have to label some data (eg with tusk sizes/tusk bounding boxes) and train a classifier/regressor on that. You may be able to get away with using less labelled data if you do unsupervised learning on your large batch of unlabelled images first. But as far as I know there's not a huge amount of work on deep unsupervised learning on full natural images (usually people just get big datasets and train supervised nowadays).

Nobody really uses convolutional RBMs for full scale natural images (because there're some trickinesses involved in getting RBMs to work with natural images, and a whole lot of trickiness in training RBMs in general), so you'd be heading into uncharted waters there....

Your best bet is probably to start with a network that's already been pretrained for ImageNet (which contains elephants), then remove the last layer or 2, and use it as a feature extractor (which can optionally be finetuned by backprop). Many people use the "FC7" features - the features from fully-connected-layer-7 of the famous AlexNet. You can train a new MLP or SVM on top of these features using your small tusk-size detection dataset.


Just wanted to add a reference: Fully Convolutional Networks for Semantic Segmentation. I think you are better off going this route than a purely unsupervised route (at this point in time).

Maybe you can find a pretrained convolutional segmentation network and use that to start building a hand-labelled image set? More specifically:

  1. Find or train a conv net for semantic segmentation. I'm not sure how big those elephant photos are, but the one you posted seems very hi-res. You would definitely need to downsample the images if you plan on training from scratch. Maybe you could contact the authors of the aforementioned paper and see if they shared their code or are aware of open source implementations of their model.
  2. Next you can label a certain portion of these properly tusk segmented images by hand? You will have to do some of your own "data-munging" here and use a convolutional segmentation network to build a training set for your specific task.

I am imagining the following pipeline, just throwing it out there:

Raw Image -> Segmentation model -> Hand labelling of which segment is a tusk and the approximate length of the tusk (as the segmentation model might return many different segments and some images may not have the tusk captured) -> Train a network which 1) identifies tusks and then 2) predicts the length of the tusk.

It's not impossible, but it may be difficult to find the right architecture and tune everything. You can have a multistage classification pipeline, maybe sequentially stacking two different supervised networks together. But I do think you need to generate some sort of labels. The labels here are much more complex and richer than class labels as they require a "spatial label" like here is the tusk, and then a float label, this is the approximate length.

Maybe you could contact the article's co-authors and get their opinion? They seem to be experts on using deep learning methods for these types of tasks.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.