Entradas

Tuberculosis MODS Image Diagnosis - Test

Imagen
Best regards. Here I enable an online tuberculosis diagnosis using the Microscopic observation drug susceptibility (MODS)  assay [1]. This tool has been developed using Convolutional Neural Networks , with 15 layers. The performance this model got: Dev set.- Images: 256, specificity: 0.8828, sensitiviy: 0.7969, accuracy: 0.8398. Test-set: Images 5104,  specificity:  0.5329, sensitivity: 0.9510, accuracy: 0.7420 This is a test example to put future models online. This is part of the work being developed at Cayetano Heredia Peruvian Univeristy, R&D Laboratories, Bioinformatics and Molecular Biology laboratory. This is not the best performance achieved though. This tool will classify a MODS image into positive or negative and will show the score for this selection.  The backend is hosted in heroku with a free plan so it might be slow, have failures of communication and might really take a long time for the first run after ...

Tensorflow Batch norm not working

Have you experienced that when using  tf.contrib.layers.batch_norm during test time, the performance is diminished or is completely a mess? If yes, this post is for you. Quick summary: 1) As suggested in [1]:   you have do add this additional code:   update_ops = tf . get_collection ( tf . GraphKeys . UPDATE_OPS )   with tf . control_dependencies ( update_ops ):     train_op = optimizer . minimize ( loss ) 2) You have to use a placeholder to indicate that you are training or not, so you put this in the batch_norm param  is_training = your_place_holder, True for training. 3) If after this it doesn't show a good behavior, change the default  decay = 0.999, to a lower value such as  0.5. Other way to apply batch norm is presented in [2], for a manual setup. Nonetheless, if by using this second approach you still have a bad performance, use the point 3). If you want to use this second approach with Convolutional Neural Netw...

Keras with tensorflow GPU

I haven't seen this information explicitly on the web rather than issues reported. When using a virtual environment where you have installed tensorflow-gpu and you install keras, keras will install the CPU tensorflow version. By doing this it won't be possible to use the GPU. Thus, the correct order to use keras with the GPU tensorflow version is: Install keras Install tensorflow-gpu After this, the default backend for keras will be tensorflow and will work with the GPU. To validate if you are using the GPU [1] : import tensorflow as tf sess = tf . Session ( config = tf . ConfigProto ( log_device_placement = True ))

Image segmentation by color mean and standard deviation

I present an online segmentation javascript implementation of segmentation given the r,g,b means an standard deviation of each one. Since it is javascript it means it will run on your browser using your computation power, thus, you should test it with small images first.   The pixels that fall in the range [ mean - std; mean + std ] will remain in the visualization. Those who don't, will be turned into black. The std factor will multiply the std value of every channel. It is easier to follow the changes by changing a factor than the std values independently.  Upload Image File: Controls Mean: Red Mean Green Mean Blue Mean Controls Std: Red std Green std Blue std Std factor

Deep neural networks visualization

Imagen
In this publication I present a "toy tool" to see how neurons on a Deep Neural Network (DNN) modify the links between them. These links are also called Weights. For those with technical knowledge, the "bias" unit is not shown (Because of lack of time, I will upgrade it later). In addition I haven't implemented yet the predict option, I would probably add it later. Technical Notes: This DNN uses standard back propagation without optimizations such as Adam optimizer or regularization parameters.   I am using Math.js  for the matrix operations. There are some errors I haven't figured out yet how to solve them, specially for Nan values that will appear when showing the visualization (Sometimes happens, no worry =) ) The last layer, the output layer is a sigmoid layer by default. Maybe later I will implement a linear function for regression analysis. And it has been implemented for binary classification by the moment. The weights are randomly init...

Google charts timeline online for non software developers

Imagen
In this post I provide an online way to create a Google Chart timeline type. Google charts are for software developers or people with some coding skills. Here, I try to allow common citizens use this technology. After reading the instructions you will be able to create a chart like the following: There are two ways Way I: Write in the input text field below The format write in it is: Category name1, event name1,Start date1, End Date1; Category name2, event name2,Start date2, End Date2; ...Category nameN, event nameN,Start dateN, End DateN Category name is the row name where the event will be added. According to the example above, it would be "President" or "Vice President". Event name is the event in colors that will be added to the categories. An event name would be "George Washington". Start date and end Date are the start and end date/time of the event. Both have the following structure "yyyy/mm/dd hh:mm" . It...

Google Chart Word tree for non programmers online

Imagen
In this series of publications I am aiming to enable Google charts to people without programming skills. Maybe you need a fancier way to present your charts than what your current office applications provide you. Or for any other case, here I present an option to extend your possibilities. In this case, you would be able to have a tree graphic with the following structure: I have seen this kind of graphic in taxonomy reports. Therefore, I have used some  International Committee on Taxonomy of Viruses (ICTV) data as input example. Two ways to get a similar chart: Way 1 In the text box below insert sentences separated by a ";". The root word will be the first word that appears in this field. For example, a sentence like "bryan is great;bryan is awesome;bryan the best", will produce the following diagram: Remember not adding a ";" at the end of all the text. Add ";" only between sentences. Steps: Write the sente...