Jun 01, 2021 Article blog
This article was reproduced to Know ID: Charles (Bai Lu) knows his personal column
Download the W3Cschool Mobile App, 0 Foundation Anytime, Anywhere Learning Programming >> Poke this to learn
"After a different cloud, the water has been flowing for ten years." Busy found that there are many days did not update the public number, come to a more hair
Start pushing some reptile-related content next month, and there really isn't much time this month. 】
Cell detection is achieved using a full convolution network plus filter.
Let's get off to a happy start!
Baidu web download link:
https://pan.baidu.com/s/16W2uByTpThAH8GUrv7pOZg
Password: 5f5k
Python version:
3.6.4
Related modules:
numpy module;
PIL module;
scipy module;
TensorFlow-GPU module;
tensorlayer module;
matplotlib module;
and some Python's own modules.
TensorFlow-GPU version:
1.6.0
Test platform:
Windows10
Install Python and add it to the environment variable, and pip installs the relevant modules that are required.
Among them, TensorFlow-GPU environment construction please refer to the relevant network tutorials, pay attention to the version and drive strict correspondence can be.
Introduction to the principle
Cell detection algorithms implemented using a simple full convolution network plus Gaussian and statistical sorting filters.
The structure of the full convolutional network is:
The training set contains 6 types of cell images:
(categorized by its center)
(1) Cell overlap:
(2) Non-target cells:
(3) Cell edge
(4) Cell gap:
(5) Background:
(6) Cell center point:
T_T believe that the clever little buddy has guessed:
The cell detection algorithm we use is actually to use a sliding window to traverse a given image, each window's image feel wild input to a well-trained network, to determine whether the center of the window is the center of the cell, if so marked. The idea is similar to RCNN, but we added filters to the test results to improve its accuracy.
For details of the implementation process, see the source code in the relevant file.
Model training:
Run the train.py file in the cmd window.
The original dataset and the data set that was converted to the tfrecords format are provided in the relevant files. T raining is done using a dataset in the tfrecords format. If you want to build it yourself, remove the comments from the following image and modify the original dataset path in the function as your own dataset path:
Training effect map:
Model testing:
The trained model is provided in the relevant file, run the test.py file in the cmd window, and modify the test image path in the file yourself before running:
Original image 1:
Detection effect 1 (note the red dot):
Original image 2:
Detection Effect 2:
That'all~~~
The model design is simple and the efficiency is low. After that, some high-end point algorithms will be pushed
The code has been tested as of 2018-05-30.