Jumat, 26 Juli 2019

Detecting Malaria using Convolutional Neural Network (CNN)


Kali ini saya membuat deteksi penyakit malaria berdasarkan citra image sel darah merah yang diambil menggunakan mikroskop. Sel darah merah yang terkena penyakit malaria, dapat dilihat pada sel darah tersebut terdapat bercak atau stain. Sel darah tersebut memiliki beberapa fase hingga stadium 4.
Ada 5 class yang akan digunakan untuk mendeteksi penyakit malaria:
1.       Normal : 30 data
2.       Tropika Stadium I  : 30 data
3.       Tropika Stadium II  : 30 data
4.       Tropika Stadium III  : 30 data
5.       Tropika Stadium IV  : 30 data
Total data : 150
Data latih : 125 (@ 25 data)
Data uji : 25 data (@ 5 data)
Karena keterbatasan data, saya menggunakan persentase 85% untuk data training dan 15% untuk data testing.


Langkah Kerja :
1.       Saya membagi data : 85% data training dan 15% data testing.
2.       Yang pertama saya lakukan adalah mengubah image yang tadinya 3D (3 dimensional array) atau image RGB menjadi image grayscale - 1D float32. Kenapa ?  

Why convert into floating array ?
RGB values are usually stored as integers to save memory. But doing math on colors is usually done in float because it's easier, more powerful, and more precise. The act of converting floats to integers is called "quantization", and it throws away precision.


About rescaling image
rescaling images will affect the "quality" of the information.

If the features you're looking for are small, you might do better to crop (divide) the original image into several smaller images, keeping the original resolution. If the features are very large, then the chances are better that downsampling might not have a dramatic affect on your algorithm performance (as if you had simply captured with a lower resolution sensor).

Image processing is very application oriented . You have to find the sensivity of your application to find how far you can resize your image. You have to rewrite your algorithm with modular manner to be able to process your image, based on blocks and stages.



Cheat sheet [FEATURE EXTRACTION]- read segmentation : http://scipy-lectures.org/advanced/image_processing/ -


Convert 3D to 1D [reshape] : https://www.youtube.com/watch?v=l_b-4AegS9s
gray = np.reshape(gray,(-1,))
3.       Setelah saya ubah, kemudian data array tersebut saya simpan di file (.TXT). Untuk digunakan kembali. Struktur datanya mirip dengan MNIST.
4.        




Github :

Main :
-          backpropagation : https://github.com/leaderj1001/Backpropagation-CNN-basic


=======================
https://victorzhou.com/blog/intro-to-cnns-part-2/
https://github.com/vzhou842/cnn-from-scratch/blob/master/cnn.py

https://github.com/llSourcell/Convolutional_neural_network/blob/master/convolutional_network_tutorial.ipynb

https://github.com/llSourcell/Convolutional_neural_network/blob/master/app/model/preprocessor.py

https://github.com/leaderj1001/Backpropagation-CNN-basic/blob/master/MultiLayerCNN.py
====================

https://victorzhou.com/blog/intro-to-cnns-part-2/
https://victorzhou.com/blog/intro-to-cnns-part-1/
https://github.com/vzhou842/cnn-from-scratch

https://github.com/leaderj1001/Backpropagation-CNN-basic
======================

http://rasbt.github.io/mlxtend/user_guide/data/loadlocal_mnist/

https://chromium.googlesource.com/external/github.com/tensorflow/tensorflow/+/r0.7/tensorflow/g3doc/tutorials/mnist/beginners/index.md


Related Articles

0 komentar:

Posting Komentar