Entradas

TensorflowJS - Online star craft unit race classification

Imagen
This is an example of a StarCraft 2 image classification. Precisely, classify the race of a unit. I am using tensorflow.js, a javascript library to load a trained model with Keras. You can see all the steps in my github repo:  https://github.com/bsaldivaremc2/keras_tutorials  The images were trained with a 64 by 64 size, so all images will be resized to this shape. Click on Choose File, then click on Classify image and see the message below. The first time it will take some seconds loading the model. Upload Image File: Classify image Empty

Extract a group of items from a list randomly online tool

This is an online tool to get a group of "n" items from a list of items you "N" have, randomly. n<N. 1) Write or past the collection of items from where you want to extract random items in the Sample list text input. The items should be separated by a space or just copy/paste them from an excel/csv file directly here. 2) Define the number of items to extract randomly 3) Push the Draw Samples button and you are done! **Press directly the Draw Samples button to see what happens ===================================================== Insert the samples separated by a space or copy paste from an excel: Sample list: Number of samples to draw from the total samples ==================================================== The code to generate this tool is here: https://github.com/bsaldivaremc2/random_item_extractor

AttributeError: module 'pandas' has no attribute 'computation'

If you had the problem: AttributeError: module 'pandas' has no attribute 'computation' When maybe trying to follow the step by step of Capsule networks implementation from this tutorial you might have encounter this error. The solution was shared in this post  . In summary, update the package dask to the version 0.15 or 0.16.  

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