Automatic counting of Varroa mites

Beekeeping & Apiculture Forum

Help Support Beekeeping & Apiculture Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Kirtsim

New Bee
Joined
Jun 6, 2018
Messages
5
Reaction score
0
Location
United Kingdom
Hive Type
None
Hi everyone!

I'd like to ask you for help with my MSc project the objective of which is to automate counting of Varroa mites from images. I'm about to use machine learning, more specifically Convolutional Neural Networks (CNN) to detect mites in images. However, this requires me to train a CNN model on a large number of images in which mites are present. I've been able to collect more than 100 images just by browsing the internet. Unfortunately, it is by far not enough as I'll need at least three times more.

I'm writing this post in this section of the forum, because the final outcome of the project will be, in the ideal case, an android app. It would allow beekeepers to take images of the hive's bottom board (or possibly any part of a hive), process the images and give the count of mites that were detected. I said "in ideal case" as it entirely depends on how quick and successful the "model training" will be. Currently I'm in a situation, when I can't do much of a progress unless I have the required data.

I would be really thankful to anyone here who would offer some help with the image collection. Please, if you happen to have Varroa mites present in your hives, I'd like to ask you take some photos of them and send them to my supervisor's email address at the end of this post. Now, I know that I'm already asking too much, but it'd be ideal if you could also provide some accompanying information such as the number of mites present and their positions in the images. This will help me later on when labelling (preparing) the images for training and prevent me from accidentally missing or falsely identifying mites in the images. The images should be of a reasonable quality, meaning that the mites should be identifiable. I guess the best place, to find the Varroas and to take the images of is the bottom board of the hive. (just my humble opinion :) ).

A big THANK YOU in advance if you decide to help. It will be very appreciated! :). In case you had any questions about all this, please do not hesitate and ask me.

If you'd like to send some images:
Email address: [email protected]
Message subject: bee-pix
Images info (message body):
  • total number of mites
  • positions of mites
:thanks:
 
I tend to do mite counting later in the year. Is there an end date?
E
 
What resolution do you require? It might help in preventing a pic of a whole frame, if that is not appropriate, at the minimum pixels possible!

Guessing, here, you want pics of bees, not the floors(after vaping with oxalic acid)?
 
Last edited:
What resolution do you require? It might help in preventing a pic of a whole frame, if that is not appropriate, at the minimum pixels possible!

Guessing, here, you want pics of bees, not the floors(after vaping with oxalic acid)?

Good point.....before or after treatment or both:hairpull:
 
I tend to do mite counting later in the year. Is there an end date?
E
To be honest, I need as many images as soon as possible. I've got the entire summer to finish my project (3 months, deadline: beginning of September). It might look like a plenty of time, but it's not. The model training itself is a very time consuming process and so is the preparation of the data. I'd like to get to a point where I can start building an actual application which will also eat a significant portion of the remaining time.

What resolution do you require? It might help in preventing a pic of a whole frame, if that is not appropriate, at the minimum pixels possible!

Guessing, here, you want pics of bees, not the floors(after vaping with oxalic acid)?
Well, the lower the resolution, the faster the training. The thing is, if you can clearly identify mites from the image of a whole frame then it's totally fine. It doesn't matter, whether the mites are dead or alive, on bees or just by themselves, as long as it's obvious for a beekeeper to say: "Oh, yes, this is mite!", the image is good to be used. In my post, I mentioned bottom board. It's because as to my knowledge, apart from dead bees and debris, you can also find dead or alive Varroas there (in case of infestation), the count of which is a good indicator of the level of infestation. That is why it was originally meant to train the CNN model only on images of this part of a hive. But, for variance and robustness of the model I'm gonna be using even images of frames or other parts of the hive, as long as they contain the mites.

In terms of the image resolution again, I'd say any resolution will do. If the image happens to be too large, I'll simply crop it or resize it or maybe split it into multiple images which gives me even more training data :).

The images can be taken both, before and after treatment as long as they can be used as positive samples, i.e. contain mites.
As I need a lot of samples (images), you can take several photos of the same spot and introduce some variance to them by changing the angle or lighting. As long as they are not completely the same, they're good.
 
Last edited:
Also I need to mention this:

If an image you're sending contains too many mites it might be almost impossible to list all their positions in the body of the email message.

Anyway, if you're comfortable with computers, you could open a copy of the image in a photo editing tool or "Paint" (in Windows) and just mark the mites. Then you would send the marked image along with the original. This would be the most preferred way and possibly even the easiest.
There are also free online photo editors that can be found on the Internet:
Pixlr
befunky (after uploading the image, you can find a "paint brush" in the "Touch up" menu on the left (eye icon)

I'd post links, but I'm not allowed to. Google search should do the trick.

Alternatively, only provide the count information and I'll do my best to find them myself.
 
well, you're not far from the truth. I rather prefer the term Software Developer/Engineer though, as the nature of work of a "programmer" differs in my mind.

Either way, is it something that's concerning? Honestly, I found the project interesting, it tries to address a real-world problem, that is why I chose it. Moreover, it involves Machine learning which I find fascinating. I hope, it's not an issue here. :)
 
It's not ... but pollen and wax granules on the Varroa tray mite be. I've dabbled with automating mite counting - though using ImageJ software that allows characteristics such as the colour and "roundness" of the mite to be used for recognition - and it's not easy. Under real world conditions I could achieve something like 60-75% accuracy on a good day. The trouble starts when the mite levels are high, there's a lot of detritus on the bottom board and some of the mites are on their edge (rather than lying flat).

Good luck and we'll be interested to hear how you get on.
 
Thank you.
You're definitely right, it's not easy, especially when you want to use pure image manipulation in software like ImageJ. I personally tried it too, but with OpenCV library. That's where Machine learning comes handy with its Neural Nets (NN) which can provide very good results, although you can never expect 100% accuracy. The more data you train your NN model with, the higher chance that it even objects that are partially obscured or in weird angles are correctly identified. But there are other factors that come into play such as certain parameters that you adjust before training.

And, yes, false positives or mites missed by the NN are always going to be an issue. I don't think you can completely eliminate them. The idea is rather, to give the beekeeper a number/indication (though not 100% accurate), so they know there is a certain (approximate) level of infestation. It might have increased or decreased since the last time you checked with the tool.
 

Latest posts

Back
Top