-3

I have to analyse some images of drops, taken using a microscope, which may contain some cell. What would be the best thing to do in order to do it?

Every acquisition of images returns around a thousand pictures: every picture contains a drop and I have to determine whether the drop has a cell inside or not. Every acquisition dataset presents with a very different contrast and brightness, and the shape of the cells is slightly different on every setup due to micro variations on the focus of the microscope.

I have tried to create a classification model following the guide "TensorFlow for poets", defining two classes: empty drops and drops containing a cell. Unfortunately the result wasn't successful.

I have also tried to label the cells and giving to an object detection algorithm using DIGITS 5, but it does not detect anything.

I was wondering if these algorithms are designed to recognise more complex object or if I have done something wrong during the setup. Any solution or hint would be helpful!

Thank you!

This is a collage of drops from different samples: the cells are a bit different from every acquisition, due to the different setup and ambient lights

talonmies
  • 70,661
  • 34
  • 192
  • 269
Gabriele S
  • 29
  • 1
  • 6
  • You need to indulge in some image pre-processing steps before feeding the images to the network. Normalization is a key aspect – Jeru Luke Apr 27 '17 at 14:45
  • @JeruLuke what do you mean by Normalization? I have tried to find an answer elsewhere, but I couldn't find a unique solution. – Gabriele S May 08 '17 at 09:30

1 Answers1

1

This kind of problem should definitely be possible. I would suggest starting with a cifar 10 convolutional neural network tutorial and customizing it for your problem.

In future posts you should tell us how your training is progressing. Make sure you're outputting the following information every few steps (maybe every 10-100 steps):

  • Loss/cost function output, you should see your loss decreasing over time.
  • Classification accuracy on the current batch of your training data
  • Classification accuracy on a held out test set (if you've implemented test set evaluation, you might implement this second)

There are many, many, many things that can go wrong, from bad learning rates, to preprocessing steps that go awry. Neural networks are very hard to debug, they are very resilient to bugs, making it hard to even know if you have a bug in your code. For that reason make sure you're visualizing everything.

Another very important step to follow is to save the images exactly as you are passing them to tensorflow. You will have them in a matrix form, you can save that matrix form as an image. Do that immediately before you pass the data to tensorflow. Make sure you are giving the network what you expect it to receive. I can't tell you how many times I and others I know have passed garbage into the network unknowingly, assume the worst and prove yourself wrong!

Your next post should look something like this:

  • I'm training a convolutional neural network in tensorflow
  • My loss function (sigmoid cross entropy) is decreasing consistently (show us a picture!)
  • My input images look like this (show us a picture of what you ACTUALLY FEED to the network)
  • My learning rate and other parameters are A, B, and C
  • I preprocessed the data by doing M and N
  • The accuracy the network achieves on training data (and/or test data) is Y

In answering those questions you're likely to solve 10 problems along the way, and we'll help you find the 11th and, with some luck, last one. :)

Good luck!

David Parks
  • 30,789
  • 47
  • 185
  • 328
  • Thank you very much for your answer: it really gave me a great help to start. I've moved back to data preprocessing at the moment: I have found and customised some script in order to augment my dataset, but I can't find a way to normalize the images, as it seems that every website/user/tutorial on the web interprets "image normalization" in a different way... any suggestion? I'm using Matlab to edit images – Gabriele S May 08 '17 at 09:45
  • Just use tensorflow's `tf.image.per_image_standardization`. Just feed it to tensorflow as the uint8 format (less cpu->gpu transfer) and convert to 32 bit and standardize in the graph. Other preprocessing steps you can see in the cifar10 tutorial. You can do brightness changes, flip the image randomly, randomly crop and shift the image, etc. All of these perturbations are beneficial. – David Parks May 08 '17 at 16:07