In part 1 of this blog post, we downloaded ~25.000 images of 100 plant species and trained a deep learning classification model. The 100 plant species are included in the Danish stream plant index (DVPI). In part 2, we create a REST API with endpoints/services that can be accessed from a very simple landing page.
All code from parts 1 and 2 of this blog post can be found on GitHub.
Plants species can be truly difficult to tell apart and this job often requires expert knowledge. However, when images are available computer vision methods can be used to guide us in the right direction. Deep learning methods are very useful for image analysis. Training convolutional neural networks have become the way to solve a wide range of image task including segmentation, classification, etc. Here, we will train a lightweight image classification model to identify 100 different plant species.
Deep learning is here to stay and has revolutionized the way data is analyzed. Furthermore, it is straightforward to get started. Recently, I played around with the fastai library to classify fish species but wanted to go further behind the scenes and dig deeper into PyTorch. As part of another project, I have used a U-Net to perform semantic segmentation of ‘pike’ in images. Training has been done on Google Colab and a local GPU powered workstation excellent for smaller experiments.
Deep learning is everywhere. The surge of new methods for analyzing all kinds of data is astonishing. Especially image analysis has been impacted by deep learning with new methods and rapid improvements in model performance for many different tasks. Convolutional neural networks (CNN) can be used to classify images with high accuracy and new libraries have made it easier than ever to build and train such networks. The best thing is that you do not need large amounts of data or specialized GPU hardware to experiment with techniques such as transfer learning, where we only need to fine-tune the last part of a pre-trained network.