52
Aedath
3y

!rant

Just wanted to share stuff. It's my first time.

<backstory>
I'm a c# dev, recently got excited about neural networks and stuff. I have a gf who studies biology
</backstory>

So i've noticed yesterday what my gf is doing for her science stuff. She has an image taken through a microscope of some erytrocytes and shit. And she's clicking on those tiny fuckers to count them. There are like almost a hundred of those things in an image and she has a butload of those images.

I was like "what the fuck? Don't you have an app that counts the stuff for you or something?"

And there is none. Or at least i wasn't able to find one. That's bullshit. My inner programmer screams with hate for boring repetitive tasks.

So i guess i'm going to write a neural network to count similar stuff in an image.

Comments
  • 4
  • 2
    . Honestly tho there has to be something.
  • 2
    .
    Keep us updated.
  • 8
    If you can manage that, it definitely seems like something that you could (and should) advertise.

    (And out of curiosity as I'm newish here, the above comments only being periods, is that a thing people do just to get further notifs on this post?)
  • 6
    @Navigatr yes. They call them tactical dots lol.
    We also use 📍 or 📌 or anything that suits you. We just want to get notifs in case the OP wrote any updates.
  • 1
    Using a neural network to count erythrocytes is a bit excessive, I would suggest you use a simpler method, like template matching or the circular Hough transform.
  • 1
    Pinning for later. Keep us updated!
  • 1
    @RememberMe thank you, I'll do some research on those.
  • 1
    Also I will keep you updated, but I don't think it will happen soon, as there is a bit of research I need to take in before starting :D Thanks for taking interest :)
  • 0
  • 0
  • 0
  • 1
  • 1
  • 0
  • 1
    . you're a saint if this goes through
  • 0
  • 1
  • 0
  • 1
    Honestly tho, why am I always the one starting the dot war hahaha
  • 0
  • 0
  • 0
    Soo... I started doing the research. I've looked into the circular transform, as @RememberMe suggested, but it doesn't seem to be a suitable algorithm, because erythrocytes are not the only round things in the image. Also it would be cool to also look for other thongs, like trypanosomas.

    Template matching might work, but i'm afraid that it will be too slow on high res images. I could downscale the images so it wouldn't take an hour to match. But i'm afraid that downscaling might affect quality. I'll give it a try tho.

    I still think that a neural net would be a better solution in the long run, but if template matching checks out - it will save me a lot of time.
  • 1
    @Aedath hmm, you could use the Hough transform to cut out all circular things and then template match? It would save a lot of processing power. Or even if you're searching for non cricular things, use some method (a segmentation algorithm?) to first find all proper objects in the image and then you can classify said objects via template matching, or even a deep neural net.

    Also, the kind of processing you need for template matching is nowhere close to the kind of stuff you need to train a deep neural network to recognise the kind of cells you want. Training a deep net is insanely heavy on processing power, especially when the input size is so large (like in case of an image classifier).
  • 0
    @RememberMe sure, training a net is heavy shit, but i kinda have to do it only once ( it might take a few days ) and after that i will only have to recreate the net from the best set, which will take no time. And i somehow think that it wouldn't be as power heavy later on. But, as i said, i'll give template matching a try first. After that, i'll try the neural net and compare them. I guess it'll be the only way to really know :D

    On the other hand i'm starting to see the data problem in training the net. I might not have a big enough dataset of annotated images...
  • 0
    @Aedath you're assuming that the network does what you want it to do in the first few tries, that's never a good assumption, as I found out the hard way XD
    Hey, if you get it working, do post. This sounds like a really useful application. I'm pretty skeptical about the practicality of training a rock solid network for this without access to a fair amount of computing power, but I'd love to be proven wrong!
    One suggestion - do not run your network on the full res images, have it classify individual objects instead, which you cut out using some other method. It'll make your job a lot easier and make the network feasible to train, because now you just have to deal with low-res cutouts.
  • 0
    @RememberMe Will do! :D
  • 1
    Hello! My 2 cents... if you are going for image processing then go with Matlab. Try to convert your gf image by finding a threshold for which all the searched dots or spots (the things she is trying to count) are made white and the rest of the image remains black.
    After that all you have to do is apply another function that will give you the number of the specific white spots.

    I hope I understood well and this might help you. If not, sorry and gl!
  • 0
    @catalinnp Fuck. I just wrote a big ass comment and the app crashed. It started doing so lately.
  • 0
    @catalinnp it would be a good idea, but the coloration of the sample is usually not perfect and everything is just different shades of purple. Moreover, usually the same thing is not colored in the same shade. Here's a partial image of the sample. The pale round thingies are erythrocytes, the deeper purple things with spots is something else. And there also is a thryponosome (the worm thingie ^^). As you can see, not all erythrocytes are the same pale purple. Some are deep purple like the other thingies, so i can't only rely only on color.
  • 1
    You could simply do a blob count for this, and only count blinds with a specific size and color range. I remember the Lego mindstorms programming software had an image processing thing with this feature.
  • 0
  • 1
Add Comment