Pages

Tuesday, August 11, 2015

New and Improved Maps of Flowers for Bees

In the final week of research prospects were looking glum. We were inching closer to our goal of accurately locating patches of flowers in the field station, but none of the results were quite as satisfying as we would have liked. Then, just a couple of days before my research would end I tried something new. 

After plotting histograms of the value of each pixel for buckwheat, grass and trees, it was clear that there was a large difference between flowering areas and non flowering areas. Value showed a much higher variance in places with flowers than those without. While grass and trees both had values skewed to one end of the spectrum, buckwheat values were all over the spectrum.    

Histogram of values in buckwheat images
Histogram of values in grass images
Histogram of values in tree images 
In order to capture this difference I added a metric calculating the variance of value for each tile. Since my last update, I have also added a classifier, using a Support Vector Machine. The classifier labels each tile as either a flower or not a flower. If it is labeled a flower the density is calculated as usual. If it is labeled not a flower the density is set to zero. After weeks of trying new things with only slightly improved results I was not terribly optimistic for this new metric. To my surprise, however, the new algorithm produced a map that almost exclusively identified buckwheat flowers!  
Density map of a transect in the field station. The buckwheat patches towards the top of the image are shown as higher density than the surrounding grass and trees. The two high density patches at the top are two people standing in the picture. Some doveweed plants are identified in the bottom of the image. 
I couldn’t celebrate immediately though, as it was possible that I had simply overtrained the algorithm on this particular data set, and it would fail on other images of buckwheat, so I tested on several other patches of buckwheat.
Several buckwheat plants at the field station. Plants with only a few blooming flowers are located at the top of the image, and plants with almost no flowers are near the people at the bottom of the image. The algorithm can differentiate between blooming and non-blooming plants. 
Patch of buckwheat at the field station. Plants are higher density than the surrounding grass, although not by much because they are largely senescent. A tree on the left hand side of the image is misidentified as having a high flower density. The algorithm does not yet distinguish between buckwheat and all trees and shrubs, but does well in many cases. 

Again, the algorithm was able to identify flowering buckwheat as high density and most other areas as low density. It also identified many doveweed flowers as high density, even without my deliberately training on this species. 

Overall, I’m very pleased with how the final maps turned out. They are by no means perfect, and the range of densities and numerical accuracy could still be improved. However, they capture the distribution of resources in the environment very well, at least in the case of buckwheat. 


For now, my summer research is over, as are the blooming seasons of most of the field station’s flowers. I’m looking forward to testing out my algorithm on more species in the spring, when flowers are blooming again.

Further Reading: 
If you want to check out the latest code visit our GitHub page here.

No comments:

Post a Comment