This project of Peripheral Blood Cells Classification have been made by Silvia García, María Ortiz and Jorge González (more information in About us button), for Final Master''s Thesis of the 3th Edition master''s degree in Deep Learning from SaturdaysAI.
', unsafe_allow_html=True) + + st.markdown('In this project, attention has been focused on the automation of the classification of peripheral blood cells using the Transfer Learning methodology, which consists of using a pre-trained artificial intelligence model, in this case the vgg19 model, and training it with an image dataset composed of 8 different classes (basophils, eosinophils, erythroblasts, immature granulocytes, lymphocytes, monocytes, neutrophils, and platelets) of different cell types.
', unsafe_allow_html=True) + st.markdown('The vgg19 pre-trained network architecture; a variant of the vgg model, consisting of 19 layers (16 convolutional and 3 connected layers, 5 MaxPool layers and one Softmax layer). The following image represents the structure of this network:
', unsafe_allow_html=True) + + st.image('./images/vgg19.png', use_column_width= True) + st.markdown('The results obtained were quite promising with a percentage of accuracy in the classification higher than 99% in all classes.
', unsafe_allow_html=True) + + st.image('./images/confusion_matrix.png', use_column_width= True) + st.markdown('This confusion matrix indicates the accuracy of the model when classifying cell types. As can be seen, the vgg19 model predicts the different images with great accuracy.
', unsafe_allow_html=True) + + + st.markdown('Tensorflow Projector (https://projector.tensorflow.org/) is a visual tool that allows us to interact and analyze multidimensional data (embeddings) and project them into a two- or three-dimensional space. Each embedding is represented by a point that has a certain position in space and these will form certain clusters based on a similarity score. Thanks to this tool, we are able to observe how the model is capable of distinguishing the different classes (ig, leukocytes, etc), and where it has the greatest problems in distinguishing them through the appearance of certain points of different classes within a cluster of a different class.
', unsafe_allow_html=True) + st.markdown('Dimensionality reduction methods such as t-stochastic neighbor embedding (t-SNE) allow us to visualize our embeddings in a three-dimensional way, constructing a probability distribution over pairs of embeddings in space, such that the most similar ones are more likely to be included in each other. the same cluster, reducing the dimensionality of the sample.
', unsafe_allow_html=True) + + + st.image('./images/tensor.png', use_column_width= True) + st.markdown('As can be seen in this figure, there are various insertions of certain groups within clusters belonging to other classes. In this case, the model is more confused giving a correct classification when dealing with neutrophils and immature granulocytes. Other notable insertions are erythroblasts, which are confused with platelets, neutrophils with basophils, and immature granulocytes with monocytes. Even so, the precision of the model when classifying the different cell types is very high.
', unsafe_allow_html=True) + + + + else: + st.title('Acerca del proyecto') + container = st.container() + #text_ini = '**Este trabajo de clasificación de células sanguíneas periféricas es un proyecto realizado por Silvia García, María Ortiz y Jorge González (más información en el apartado *Sobre nosotros*), para el Trabajo de Fin de Máster de la tercera edición del máster en Deep Learning de SaturdaysAI.**' + st.markdown('Este trabajo de clasificación de células sanguíneas periféricas es un proyecto realizado por Silvia García, María Ortiz y Jorge González (más información en el apartado Sobre nosotros), para el Trabajo de Fin de Máster de la tercera edición del máster en Deep Learning de SaturdaysAI.
', unsafe_allow_html=True) + + st.markdown('En este proyecto, se ha centrado la atención a la automatización de la clasificación de células sanguíneas periféricas utilizando la metodología de Transfer Learning, la cual consiste en utilizar un modelo de inteligencia artificial pre-entrenado, en este caso el modelo vgg19, y entrenarlo con un dataset de imágenes compuesto por 8 clases diferentes (basófilos, eosinófilos, eritroblastos, granulocitos inmaduros, linfocitos, monocitos, neutrófilos y plaquetas) de diferentes tipos celulares.
', unsafe_allow_html=True) + st.markdown('La arquitectura de red pre-entrenada vgg19; una variante del modelo vgg, que consta de 19 capas (16 de convolución y 3 capas conectadas, 5 capas de MaxPool y una de Softmax). La siguiente imagen representa la estructura de esta red:
', unsafe_allow_html=True) + + #st.write(text_ini) + # text1 = 'En este proyecto, se ha centrado la atención a la automatización de la clasificación de células sanguíneas periféricas utilizando la metodología de *Transfer Learning*, la cual consiste en utilizar un modelo de inteligencia artificial pre-entrenado, en este caso el modelo *vgg19*, y entrenarlo con un dataset de imágenes compuesto por 8 clases diferentes (basófilos, eosinófilos, eritroblastos, granulocitos inmaduros, linfocitos, monocitos, neutrófilos y plaquetas) de diferentes tipos celulares.' + # = 'La arquitectura de red pre-entrenada *vgg19*; una variante del modelo *vgg*, que consta de 19 capas (16 de convolución y 3 capas conectadas, 5 capas de MaxPool y una de Softmax). La siguiente imagen representa la estructura de esta red:' + # st.write(text1) + #st.write(text2) + st.image('./images/vgg19.png', use_column_width= True) + st.markdown('Los resultados obtenidos, fueron bastante prometedores con un porcentaje de precisión en la clasificación superior al 99% en todas las clases.
', unsafe_allow_html=True) + + #text3 = 'Los resultados obtenidos, fueron bastante prometedores con un porcentaje de precisión en la clasificación superior al 99% en todas las clases.' + #st.write(text3) + st.image('./images/confusion_matrix.png', use_column_width= True) + st.markdown('Esta matriz de confusión nos indica la precisión del modelo a la hora de clasificar los tipos celulares. Como se puede observar, el modelo vgg19 predice con gran exactitud las diferentes imágenes.
', unsafe_allow_html=True) + + st.markdown('Tensorflow Projector (https://projector.tensorflow.org/) es una herramienta visual que nos permite interactuar y analizar datos multidimensionales (embeddings) y proyectarlos en un espacio bi o tridimensional. Cada embedding es representado por un punto que tiene una posición determinada en el espacio y estos formarán determinados clusters basándose en una puntuación de similitud. Gracias a esta herramienta, somos capaces de observar cómo el modelo es capaz de distinguir las diferentes clases (ig, leucocitos, etc), y dónde tiene los mayores problemas para distinguirlas mediante la aparición de ciertos puntos de diferentes clases dentro de un cluster de una clase diferente.
', unsafe_allow_html=True) + st.markdown('Métodos de reducción de dimensionalidad como t-stochastic neighbor embedding (t-SNE) nos permiten visualizar nuestros embeddings de manera tridimensional, construyendo una distribución de probabilidad sobre parejas de embeddings en el espacio, de forma que los más similares son más probables de incluirse en un mismo cluster, reduciendo la dimensionalidad de la muestra.
', unsafe_allow_html=True) + + #text4 = 'Esta matriz de confusión nos indica la precisión del modelo a la hora de clasificar los tipos celulares. Como se puede observar, el modelo *vgg19* predice con gran exactitud las diferentes imágenes.' + #st.write(text4) + #text5 = 'Tensorflow Projector (https://projector.tensorflow.org/) es una herramienta visual que nos permite interactuar y analizar datos multidimensionales (embeddings) y proyectarlos en un espacio bi o tridimensional. Cada embedding es representado por un punto que tiene una posición determinada en el espacio y estos formarán determinados clusters basándose en una puntuación de similitud. Gracias a esta herramienta, somos capaces de observar cómo el modelo es capaz de distinguir las diferentes clases (ig, leucocitos, etc), y dónde tiene los mayores problemas para distinguirlas mediante la aparición de ciertos puntos de diferentes clases dentro de un cluster de una clase diferente. ' + #st.write(text5) + #text6 = 'Métodos de reducción de dimensionalidad como t-stochastic neighbor embedding (t-SNE) nos permiten visualizar nuestros embeddings de manera tridimensional, construyendo una distribución de probabilidad sobre parejas de embeddings en el espacio, de forma que los más similares son más probables de incluirse en un mismo cluster, reduciendo la dimensionalidad de la muestra. ' + #st.write(text6) + st.image('./images/tensor.png', use_column_width= True) + st.markdown('Como se puede observar en esta figura, existen diversas inserciones de ciertos grupos dentro de clusters pertenecientes a otras clases. En este caso, el modelo se encuentra más confuso dando una clasificación correcta cuando se trata de neutrófilos y granulocitos inmaduros. Otras inserciones destacables son los eritroblastos, que son confundidos con plaquetas, los neutrófilos con basófilos, y los granulocitos inmaduros con monocitos. Aun así, la precisión del modelo a la hora de clasificar los diferentes tipos celulares es muy alta.
', unsafe_allow_html=True) + + #text7 = 'Como se puede observar en esta figura, existen diversas inserciones de ciertos grupos dentro de clusters pertenecientes a otras clases. En este caso, el modelo se encuentra más confuso dando una clasificación correcta cuando se trata de neutrófilos y granulocitos inmaduros. Otras inserciones destacables son los eritroblastos, que son confundidos con plaquetas, los neutrófilos con basófilos, y los granulocitos inmaduros con monocitos. Aun así, la precisión del modelo a la hora de clasificar los diferentes tipos celulares es muy alta.' + #st.write(text7) \ No newline at end of file diff --git a/about_us.py b/about_us.py new file mode 100644 index 0000000000000000000000000000000000000000..fe42f36d20f7feaf6346b61c9c08c1758bfda1c5 --- /dev/null +++ b/about_us.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +""" +Created on Fri Dec 30 11:31:47 2022 + +@author: Usuario +""" + +import streamlit as st +from tensorflow.keras.utils import load_img +import streamlit.components.v1 as components + +target_size = (224,224) + +def person(url):#(im_path, name, text): + #im = load_img(im_path, target_size = target_size) + #st.markdown ("María Ortiz Rodríguez
', unsafe_allow_html=True) + + # text = """**B.S in Experimental Sciences, + # M.S in Computational Biology, and actually PhD student in Biophysics. + #Her work is focused on understanding the stoichiometry and dynamics of the human mitochondrial DNA replication machinery.**""" + #text = '''**Graduated in Experimental Sciences from Universidad Rey Juan Carlos and Master in Computational Biology from Universidad Politécnica de Madrid. Currently PhD student in Molecular Motors Lab at IMDEA Nanoscience, where she studies the mechano-chemistry of the molecular motors using single-molecule techniques.** ''' + + image1 = 'https://media.licdn.com/dms/image/C4D03AQG-uP0d65Xmxg/profile-displayphoto-shrink_800_800/0/1633675482831?e=1678320000&v=beta&t=4tSZ3b3ZqM6-1BImm5TFqMpiOMdP_g2JLIQvH6631bk' + #image = load_img('https://media.licdn.com/dms/image/C4D03AQG-uP0d65Xmxg/profile-displayphoto-shrink_800_800/0/1633675482831?e=1678320000&v=beta&t=4tSZ3b3ZqM6-1BImm5TFqMpiOMdP_g2JLIQvH6631bk') + person(image1) + text = st.markdown('Graduated in Experimental Sciences from Universidad Rey Juan Carlos and Master in Computational Biology from Universidad Politécnica de Madrid. Currently PhD student in Molecular Motors Lab at IMDEA Nanoscience, where she studies the mechano-chemistry of the molecular motors using single-molecule techniques.
', unsafe_allow_html=True) + + + with col2: + nombre2 = st.markdown('Jorge González Sierra
', unsafe_allow_html=True) + + image2 = 'https://media.licdn.com/dms/image/C4E03AQEhOy-LzpixAg/profile-displayphoto-shrink_800_800/0/1655383235096?e=1678320000&v=beta&t=WQsyJ1eJvxvnI6Z7-WgOYebRYlPwOtQARVVqAOYTPZQ' + #text = '''**Graduated in Environmental Sciences from the Universidad Autonoma de Madrid and Master in Industrial and Environmental Biotechnology from the Universidad Complutense de Madrid and MBA from the Universidad Francisco de Vitoria. Currently pursuing a PhD in biofuels for aviation and high value-added bioproducts at the Universidad Rey Juan Carlos de Madrid.**''' + + person(image2) + text = st.markdown('Graduated in Environmental Sciences from the Universidad Autonoma de Madrid and Master in Industrial and Environmental Biotechnology from the Universidad Complutense de Madrid and MBA from the Universidad Francisco de Vitoria. Currently pursuing a PhD in biofuels for aviation and high value-added bioproducts at the Universidad Rey Juan Carlos de Madrid.
', unsafe_allow_html=True) + + with col3: + #nombre3 = st.markdown ("Silvia García Hernández ", unsafe_allow_html=True) + nombre3 = st.markdown('Silvia García Hernández
', unsafe_allow_html=True) + + image3 = 'https://media.licdn.com/dms/image/C4D03AQFxqX-hVzyPzQ/profile-displayphoto-shrink_800_800/0/1659343843421?e=1678320000&v=beta&t=GAi23Hg4GSvuf1kPjUCkcZ0r3psZ3Ure9_0SXNedW1U' + #text = '''**Graduated in Electronic Engineering from the University of La Laguna and Master in Artificial Intelligence from the University of Las Palmas. Currently working as Data Scientist at EVM Group where she leads the technical decisions in Artificial Intelligence for projects under development. As fundamental pillars in the professional field, she has continuous learning and help in the development of technological-social initiatives, which is why she is a member of both AdaLoveDev and Python Canarias, and has made presentations at the AdaLoversConf and CESINF VIII events. She enjoys learning and coding in any field related to Data.**''' + person(image3) + text = st.markdown('Graduated in Electronic Engineering from the University of La Laguna and Master in Artificial Intelligence from the University of Las Palmas. Currently working as Data Scientist at EVM Group where she leads the technical decisions in Artificial Intelligence for projects under development. As fundamental pillars in the professional field, she has continuous learning and help in the development of technological-social initiatives, which is why she is a member of both AdaLoveDev and Python Canarias, and has made presentations at the AdaLoversConf and CESINF VIII events. She enjoys learning and coding in any field related to Data.
', unsafe_allow_html=True) + + else: + st.title('Sobre nosotros') + col1, col2, col3 = st.columns([100,100,100]) + + with col1: + nombre1 = st.markdown('María Ortiz Rodríguez
', unsafe_allow_html=True) + + #text = ''' **Graduada en Ciencias Experimentales por la Universidad Rey Juan Carlos y Máster en Biología Computacional por la Universidad Politécnica de Madrid. Actualmente realizando el doctorado en Molecular Motors Manipulation Lab en IMDEA Nanociencia, donde estudia la mecano-química de los motores moleculares mediante el uso de las técnica de moléculas individuales.**''' + image1 = 'https://media.licdn.com/dms/image/C4D03AQG-uP0d65Xmxg/profile-displayphoto-shrink_800_800/0/1633675482831?e=1678320000&v=beta&t=4tSZ3b3ZqM6-1BImm5TFqMpiOMdP_g2JLIQvH6631bk' + person(image1) + text = st.markdown('Graduada en Ciencias Experimentales por la Universidad Rey Juan Carlos y Máster en Biología Computacional por la Universidad Politécnica de Madrid. Actualmente realizando el doctorado en Molecular Motors Manipulation Lab en IMDEA Nanociencia, donde estudia la mecano-química de los motores moleculares mediante el uso de las técnica de moléculas individuales.
', unsafe_allow_html=True) + + with col2: + nombre2 = st.markdown('Jorge González Sierra
', unsafe_allow_html=True) + + image2 = 'https://media.licdn.com/dms/image/C4E03AQEhOy-LzpixAg/profile-displayphoto-shrink_800_800/0/1655383235096?e=1678320000&v=beta&t=WQsyJ1eJvxvnI6Z7-WgOYebRYlPwOtQARVVqAOYTPZQ' + #text = '''**Graduado en Ciencias Ambientales por la Universidad Autonoma de Madrid y Máster en Biotecnologia industrial y ambiental por la Universidad Complutense de Madrid y MBA por la Universidad Francisco de Vitoria. Actualmente realizando el doctorado en biocombustibles para aviación y bioproductos de alto valor añadido en la Universidad Rey Juan Carlos de Madrid.**''' + person(image2) + text = st.markdown('Graduado en Ciencias Ambientales por la Universidad Autonoma de Madrid y Máster en Biotecnologia industrial y ambiental por la Universidad Complutense de Madrid y MBA por la Universidad Francisco de Vitoria. Actualmente realizando el doctorado en biocombustibles para aviación y bioproductos de alto valor añadido en la Universidad Rey Juan Carlos de Madrid.
', unsafe_allow_html=True) + + + with col3: + nombre3 = st.markdown('Silvia García Hernández
', unsafe_allow_html=True) + + image3 = 'https://media.licdn.com/dms/image/C4D03AQFxqX-hVzyPzQ/profile-displayphoto-shrink_800_800/0/1659343843421?e=1678320000&v=beta&t=GAi23Hg4GSvuf1kPjUCkcZ0r3psZ3Ure9_0SXNedW1U' + #text = '''**Graduada en Ingeniería Electrónica por la Universidad de La Laguna y Máster en Inteligencia Artificial por la Universidad de Las Palmas. Actual Científica de Datos en Grupo EVM, donde lidera las decisiones técnicas en materia de Inteligencia Artificial de los proyectos en desarrollo. Como pilares fundamentales en el campo profesional posee el aprendizaje continuo y la ayuda al desarrollo de iniciativas tecnológico-sociales, razón por la cual es socia tanto de AdaLoveDev como de Python Canarias, y ha realizado ponencias en los eventos AdaLoversConf y CESINF VIII. Disfruta aprendiendo y trasteando con código sobre cualquier campo relacionado con Datos.**''' + person(image3) + text = st.markdown('Graduada en Ingeniería Electrónica por la Universidad de La Laguna y Máster en Inteligencia Artificial por la Universidad de Las Palmas. Actual Científica de Datos en Grupo EVM, donde lidera las decisiones técnicas en materia de Inteligencia Artificial de los proyectos en desarrollo. Como pilares fundamentales en el campo profesional posee el aprendizaje continuo y la ayuda al desarrollo de iniciativas tecnológico-sociales, razón por la cual es socia tanto de AdaLoveDev como de Python Canarias, y ha realizado ponencias en los eventos AdaLoversConf y CESINF VIII. Disfruta aprendiendo y trasteando con código sobre cualquier campo relacionado con Datos.
', unsafe_allow_html=True) diff --git a/explicability.py b/explicability.py new file mode 100644 index 0000000000000000000000000000000000000000..ce9c01e168edc34e0e7c230f8ad41a20a7bc04ea --- /dev/null +++ b/explicability.py @@ -0,0 +1,104 @@ +# -*- coding: utf-8 -*- +""" +Created on Tue Dec 27 08:48:25 2022 + +@author: Usuario +""" + +from keras.models import load_model +import tensorflow as tf +from tensorflow.keras.utils import load_img, img_to_array, array_to_img +from keras.preprocessing.image import ImageDataGenerator +from keras.applications.vgg19 import preprocess_input, decode_predictions +import matplotlib.pyplot as plt + +import numpy as np +from IPython.display import Image, display +import matplotlib.cm as cm + +#http://gradcam.cloudcv.org/ +#https://keras.io/examples/vision/grad_cam/ + +def get_img_array(img_path, size): + # `img` is a PIL image of size 299x299 + img = load_img(img_path, target_size=size) + # `array` is a float32 Numpy array of shape (299, 299, 3) + array = img_to_array(img) + # We add a dimension to transform our array into a "batch" + # of size (1, 299, 299, 3) + array = np.expand_dims(array, axis=0) + return array + +def make_gradcam_heatmap(img_array, model, last_conv_layer_name, pred_index=None): + # First, we create a model that maps the input image to the activations + # of the last conv layer as well as the output predictions + grad_model = tf.keras.models.Model( + [model.inputs], [model.get_layer(last_conv_layer_name).output, model.output] + ) + + # Then, we compute the gradient of the top predicted class for our input image + # with respect to the activations of the last conv layer + with tf.GradientTape() as tape: + last_conv_layer_output, preds = grad_model(img_array) + if pred_index is None: + pred_index = tf.argmax(preds[0]) + class_channel = preds[:, pred_index] + + # This is the gradient of the output neuron (top predicted or chosen) + # with regard to the output feature map of the last conv layer + grads = tape.gradient(class_channel, last_conv_layer_output) + + # This is a vector where each entry is the mean intensity of the gradient + # over a specific feature map channel + pooled_grads = tf.reduce_mean(grads, axis=(0, 1, 2)) + + # We multiply each channel in the feature map array + # by "how important this channel is" with regard to the top predicted class + # then sum all the channels to obtain the heatmap class activation + last_conv_layer_output = last_conv_layer_output[0] + heatmap = last_conv_layer_output @ pooled_grads[..., tf.newaxis] + heatmap = tf.squeeze(heatmap) + + # For visualization purpose, we will also normalize the heatmap between 0 & 1 + heatmap = tf.maximum(heatmap, 0) / tf.math.reduce_max(heatmap) + + return heatmap.numpy() + + + +# Generate class activation heatmap +#heatmap = make_gradcam_heatmap(img_array, model, last_conv_layer_name) + + +def save_and_display_gradcam(img_path, heatmap, alpha = 0.4): + # Load the original image + img = load_img(img_path) + img = img_to_array(img) + + # Rescale heatmap to a range 0-255 + heatmap = np.uint8(255 * heatmap) + + # Use jet colormap to colorize heatmap + jet = cm.get_cmap("jet") + + # Use RGB values of the colormap + jet_colors = jet(np.arange(256))[:, :3] + jet_heatmap = jet_colors[heatmap] + + # Create an image with RGB colorized heatmap + jet_heatmap = array_to_img(jet_heatmap) + jet_heatmap = jet_heatmap.resize((img.shape[1], img.shape[0])) + jet_heatmap = img_to_array(jet_heatmap) + + # Superimpose the heatmap on original image + superimposed_img = jet_heatmap * alpha + img + superimposed_img = array_to_img(superimposed_img) + + # Save the superimposed image + #superimposed_img.save('') + + # Display Grad CAM + return superimposed_img + #display(Image(superimposed_img)) + +#save_and_display_gradcam(path_image+name_image, heatmap) \ No newline at end of file diff --git a/imagen_subida.py b/imagen_subida.py new file mode 100644 index 0000000000000000000000000000000000000000..2512bd63eb2bc71542a8637baff65f6695bc9d00 --- /dev/null +++ b/imagen_subida.py @@ -0,0 +1,215 @@ +# -*- coding: utf-8 -*- +""" +Created on Fri Dec 23 09:25:09 2022 + +@author: Usuario +""" +from keras.models import load_model +import tensorflow as tf +from tensorflow.keras.utils import load_img, img_to_array, array_to_img +from keras.preprocessing.image import ImageDataGenerator +from keras.applications.vgg19 import preprocess_input, decode_predictions +import matplotlib.pyplot as plt + +import numpy as np +from IPython.display import Image, display +import matplotlib.cm as cm + +import streamlit as st +from tensorflow.keras.utils import load_img +import pandas as pd +import matplotlib.pyplot as plt + +import numpy as np +import streamlit_toggle as tog +import explicability as ex + +from bokeh.plotting import figure +from bokeh.palettes import Category20c +from bokeh.plotting import figure, show +from bokeh.transform import cumsum + + +last_conv_layer_name = "block5_conv4" + +def resultados(uploaded_image, model, size, label_names, labs, result_text): + #st.image(uploaded_image, caption='Celula Sanguinea') + + image = load_img(uploaded_image, target_size = size) + img = np.array(image) + img = img / 255.0 + img = img.reshape(1, 224, 224, 3) + + label = model.predict(img) + #st.text([np.argmax(label)]) + score = label[0] + + + #st.write(add_text_chart) + #st.write('La imagen a analizar es la mostrada a continuación. Se podrá analizar la probabilidad de pertenencia a cada tipo de célula sanguínea, así como observar el mapa de calor generado en el apartado de explicabilidad.') + + col1, mid, col2 = st.columns([300,300,300]) + + with mid: + st.image(uploaded_image, width=220, use_column_width=False) + +#with col2: + + placeholder = st.container() + tab1, tab2 = placeholder.tabs(labs)#(["Result", "Explicability"]) + + + with tab1: + + #st.write('Aquí se muestra la probabilidad de la imagen seleccionada de pertenecer a cada clase de célula sanguínea según el modelo de Inteligencia Artificial entrenado.') + st.write(result_text[0]) + st.write(' ') + #Bokeh pie chart + pie = {label_names[0]: np.round(score[0]*100, 2), + label_names[1]: np.round(score[1]*100, 2), + label_names[2]: np.round(score[2]*100, 2), + label_names[3]: np.round(score[3]*100, 2), + label_names[4]: np.round(score[4]*100, 2), + label_names[5]: np.round(score[5]*100, 2), + label_names[6]: np.round(score[6]*100, 2), + label_names[7]: np.round(score[7]*100, 2)} + datita = pd.Series(pie).reset_index(name='value').rename(columns={'index': 'country'}) + datita['angle'] = datita['value']/datita['value'].sum() * 2*np.pi + datita['color'] = Category20c[len(datita)] + p = figure(height=350, title="", toolbar_location=None, + tools="hover", tooltips="@country: @value", x_range=(-0.5, 1.0)) + p.wedge(x=0, y=1, radius=0.4, + start_angle=cumsum('angle', include_zero=True), end_angle=cumsum('angle'), + line_color="white", fill_color='color', legend_field='country', source=datita) + st.bokeh_chart(p) + + #===================== + + col1, col2, col3, col4, = st.columns([250,250,250,250]) + col1.metric(label_names[0], str(np.round(score[0]*100, 2))+"%") + col1.metric(label_names[1], str(np.round(score[1]*100, 2))+"%") + col2.metric(label_names[2], str(np.round(score[2]*100, 2))+"%") + col2.metric(label_names[3], str(np.round(score[3]*100, 2))+"%") + col3.metric(label_names[4], str(np.round(score[4]*100, 2))+"%") + col3.metric(label_names[5], str(np.round(score[5]*100, 2))+"%") + col4.metric(label_names[6], str(np.round(score[6]*100, 2))+"%") + col4.metric(label_names[7], str(np.round(score[7]*100, 2))+"%") + +#chart = pd.DataFrame(np.array(score)*100, label_names) + #st.bar_chart(chart, use_container_width=True ) + + + #p = figure(title = '', + # x_range = label_names) + #p.vbar(x = label_names, top = np.array(score)*100) + #st.bokeh_chart(p, use_container_width= True) + + # fig, ax = plt.subplots() + # ax.bar(label_names, np.array(score)*100, color = 'red') + # st.pyplot(use_container_width = True) + + with tab2: #Explicabilidad + + #st.write('El mapa de calor generado con el algoritmo GRADCAM es el mostrado a continuación. En él se puede observar qué parte de la imagen de entrada ha sido la parte más relevante para el modelo de Inteligencia Artificial en cuanto a clasificación se refiere.') + st.write(result_text[1]) + col3, col4, col5 = st.columns([300,300,300]) + + with col4: + img_array = preprocess_input(ex.get_img_array(uploaded_image, size)) + + model.layers[-1].activation = None + heatmap = ex.make_gradcam_heatmap(img_array, model, last_conv_layer_name) + + st.image(ex.save_and_display_gradcam(uploaded_image, heatmap), use_column_width=True) + + + +def idioma(): + idiomita = tog.st_toggle_switch(label = "", + key = 'he', + default_value = True, + label_after = False, + inactive_color="#ffffff", + active_color="#ffffff", + track_color="#18202b" + ) + return idiomita + + +def change_title(idioma): + if idioma == 1: + title = st.title('Peripheral blood cells classification') + #lab = ["Result", "Explicability"] + + else: + title = st.title('Clasificación de imágenes de células sanguíneas periféricas ') + #lab = ["neeee", "bruuu"] + return title + + + +def change_labels(idioma): + if idioma == 1: + labs = ["📈 Result", "📝 Explicability"] + else: + labs = ["📈 Resultados", "📝 Explicabilidad"] + + return labs + + + + +def add_bg_from_url(): + st.markdown( + """ + + """, + unsafe_allow_html=True + ) + + + +def button_image(): + st.markdown( + f""" + + """) + + +def additional_text_chart(idioma): + if idioma == 1: + text = 'The following image is going to be analysed. In **Results** you can observe the probability that this cell has to belong to a determined blood cell type, and the color map in **Explicability**' + else: + text = 'La imagen a analizar es la mostrada a continuación. Se podrá analizar la probabilidad de pertenencia a cada tipo de célula sanguínea, así como observar el mapa de calor generado en el apartado de explicabilidad.' + + return text + +def result_text(idioma): + if idioma == 1: + textito_res = 'Here appears the probability of the input image to belong to each blood cell type depending of our IA trained model.' + textito_exp = 'The color map was generated with GRADCAM algorithm. Here you can observe which part of the input image has been the most relevant part for the IA model in terms of classification.' + textito = [textito_res, textito_exp] + else: + textito_res = 'Aquí se muestra la probabilidad de la imagen seleccionada de pertenecer a cada clase de célula sanguínea según el modelo de Inteligencia Artificial entrenado.' + textito_exp = 'El mapa de calor generado con el algoritmo GRADCAM es el mostrado a continuación. En él se puede observar qué parte de la imagen de entrada ha sido la parte más relevante para el modelo de Inteligencia Artificial en cuanto a clasificación se refiere.' + textito = [textito_res, textito_exp] + return textito + +def botoncitos(idioma): + if idioma == 1: + label_pj = 'About the project 📕' + label_us = ' About us 🧝♂️ ' + labelcillos = [label_pj, label_us] + else: + label_pj = 'Sobre el proyecto 📕' + label_us = ' Sobre nosotros 🧝♂️ ' + labelcillos = [label_pj, label_us] + return labelcillos \ No newline at end of file diff --git a/images/13435.jpg b/images/13435.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2239b55c6a04dc76ca485e1de999330e9448d76e --- /dev/null +++ b/images/13435.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c57d13a1114ba913a53baf3f2c71f5bc4d2199b981e94ed03edbd4bc4b024812 +size 2313112 diff --git a/images/18994.jpg b/images/18994.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4c6df54ac3a34bc2bccaa60356c9b2160a8c43d7 Binary files /dev/null and b/images/18994.jpg differ diff --git a/images/Flag_of_the_United_Kingdom.png b/images/Flag_of_the_United_Kingdom.png new file mode 100644 index 0000000000000000000000000000000000000000..02609af071b2d9425e607fb5a0ce77513a8beb5d Binary files /dev/null and b/images/Flag_of_the_United_Kingdom.png differ diff --git a/images/United-Kingdom-Flag.png b/images/United-Kingdom-Flag.png new file mode 100644 index 0000000000000000000000000000000000000000..1dd350860619169167dbcb1398316482b8df42d2 Binary files /dev/null and b/images/United-Kingdom-Flag.png differ diff --git a/images/abstract-soft-pink-watercolor-background.zip b/images/abstract-soft-pink-watercolor-background.zip new file mode 100644 index 0000000000000000000000000000000000000000..33526f785007126bebd5d9d9566682c07521683b --- /dev/null +++ b/images/abstract-soft-pink-watercolor-background.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:596d1ff1ef498a35dec91d86e8a531fd08522df657cb7468ec2aab5e21457a73 +size 10437058 diff --git a/images/abstract-soft-pink-watercolor-background/18994.eps b/images/abstract-soft-pink-watercolor-background/18994.eps new file mode 100644 index 0000000000000000000000000000000000000000..0d10fb0c6da2839a6397f14f62c56c293f8cbc09 --- /dev/null +++ b/images/abstract-soft-pink-watercolor-background/18994.eps @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:269206eb8cff3532adefd3133afc80309bd3eaa5eafda691da5c3ab7ea515fbd +size 19795410 diff --git a/images/abstract-soft-pink-watercolor-background/License free.txt b/images/abstract-soft-pink-watercolor-background/License free.txt new file mode 100644 index 0000000000000000000000000000000000000000..041dfa8e41d462bf24b990d855715e9854e2a984 --- /dev/null +++ b/images/abstract-soft-pink-watercolor-background/License free.txt @@ -0,0 +1,45 @@ +IMPORTANT NOTICE: This license only applies if you downloaded this content as +an unsubscribed user. If you are a premium user (ie, you pay a subscription) +you are bound to the license terms described in the accompanying file +"License premium.txt". + +--------------------- + +You must attribute the image to its author: + +In order to use a content or a part of it, you must attribute it to Harryarts / Freepik, +so we will be able to continue creating new graphic resources every day. + + +How to attribute it? + +For websites: + +Please, copy this code on your website to accredit the author: +Designed by Harryarts / Freepik + +For printing: + +Paste this text on the final work so the authorship is known. +- For example, in the acknowledgements chapter of a book: +"Designed by Harryarts / Freepik" + + +You are free to use this image: + +- For both personal and commercial projects and to modify it. +- In a website or presentation template or application or as part of your design. + +You are not allowed to: + +- Sub-license, resell or rent it. +- Include it in any online or offline archive or database. + +The full terms of the license are described in section 7 of the Freepik +terms of use, available online in the following link: + + http://www.freepik.com/terms_of_use + +The terms described in the above link have precedence over the terms described +in the present document. In case of disagreement, the Freepik Terms of Use +will prevail. diff --git a/images/abstract-soft-pink-watercolor-background/License premium.txt b/images/abstract-soft-pink-watercolor-background/License premium.txt new file mode 100644 index 0000000000000000000000000000000000000000..c6cd87a63276c112f856f7579e51a45e2fe4144a --- /dev/null +++ b/images/abstract-soft-pink-watercolor-background/License premium.txt @@ -0,0 +1,30 @@ +IMPORTANT NOTICE: This license only applies if you downloaded this content as +a subscribed (or "premium") user. If you are an unsubscribed user (or "free" +user) you are bound to the license terms described in the accompanying file +"License free.txt". + +--------------------- + +You can download from your profile in Freepik a personalized license stating +your right to use this content as a "premium" user: + + https://profile.freepik.com/my_downloads + +You are free to use this image: + +- For both personal and commercial projects and to modify it. +- In a website or presentation template or application or as part of your design. + +You are not allowed to: + +- Sub-license, resell or rent it. +- Include it in any online or offline archive or database. + +The full terms of the license are described in sections 7 and 8 of the Freepik +terms of use, available online in the following link: + + http://www.freepik.com/terms_of_use + +The terms described in the above link have precedence over the terms described +in the present document. In case of disagreement, the Freepik Terms of Use +will prevail. diff --git a/images/blood-donor-icons-flat/13435.eps b/images/blood-donor-icons-flat/13435.eps new file mode 100644 index 0000000000000000000000000000000000000000..5bdd0af664d74cc2d97f2df0303d4276f94d8d3f Binary files /dev/null and b/images/blood-donor-icons-flat/13435.eps differ diff --git a/images/blood-donor-icons-flat/License free.txt b/images/blood-donor-icons-flat/License free.txt new file mode 100644 index 0000000000000000000000000000000000000000..e05e03b8aa98b514c45944f99d83bddffef8a4bf --- /dev/null +++ b/images/blood-donor-icons-flat/License free.txt @@ -0,0 +1,45 @@ +IMPORTANT NOTICE: This license only applies if you downloaded this content as +an unsubscribed user. If you are a premium user (ie, you pay a subscription) +you are bound to the license terms described in the accompanying file +"License premium.txt". + +--------------------- + +You must attribute the image to its author: + +In order to use a content or a part of it, you must attribute it to macrovector / Freepik, +so we will be able to continue creating new graphic resources every day. + + +How to attribute it? + +For websites: + +Please, copy this code on your website to accredit the author: +Designed by macrovector / Freepik + +For printing: + +Paste this text on the final work so the authorship is known. +- For example, in the acknowledgements chapter of a book: +"Designed by macrovector / Freepik" + + +You are free to use this image: + +- For both personal and commercial projects and to modify it. +- In a website or presentation template or application or as part of your design. + +You are not allowed to: + +- Sub-license, resell or rent it. +- Include it in any online or offline archive or database. + +The full terms of the license are described in section 7 of the Freepik +terms of use, available online in the following link: + + http://www.freepik.com/terms_of_use + +The terms described in the above link have precedence over the terms described +in the present document. In case of disagreement, the Freepik Terms of Use +will prevail. diff --git a/images/blood-donor-icons-flat/License premium.txt b/images/blood-donor-icons-flat/License premium.txt new file mode 100644 index 0000000000000000000000000000000000000000..c6cd87a63276c112f856f7579e51a45e2fe4144a --- /dev/null +++ b/images/blood-donor-icons-flat/License premium.txt @@ -0,0 +1,30 @@ +IMPORTANT NOTICE: This license only applies if you downloaded this content as +a subscribed (or "premium") user. If you are an unsubscribed user (or "free" +user) you are bound to the license terms described in the accompanying file +"License free.txt". + +--------------------- + +You can download from your profile in Freepik a personalized license stating +your right to use this content as a "premium" user: + + https://profile.freepik.com/my_downloads + +You are free to use this image: + +- For both personal and commercial projects and to modify it. +- In a website or presentation template or application or as part of your design. + +You are not allowed to: + +- Sub-license, resell or rent it. +- Include it in any online or offline archive or database. + +The full terms of the license are described in sections 7 and 8 of the Freepik +terms of use, available online in the following link: + + http://www.freepik.com/terms_of_use + +The terms described in the above link have precedence over the terms described +in the present document. In case of disagreement, the Freepik Terms of Use +will prevail. diff --git a/images/confusion_matrix.png b/images/confusion_matrix.png new file mode 100644 index 0000000000000000000000000000000000000000..9d5ad4e93e61d8171de1b799b19c55b4bad3ae0c Binary files /dev/null and b/images/confusion_matrix.png differ diff --git a/images/dark-brown-colour-flower-pattern-background-abstract-banner-multipurpose-design.jpg b/images/dark-brown-colour-flower-pattern-background-abstract-banner-multipurpose-design.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a32903872706bdb8913e79da784f4d77bc9bfb55 --- /dev/null +++ b/images/dark-brown-colour-flower-pattern-background-abstract-banner-multipurpose-design.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4fd041dc35fecd13c2238609e27120282088deca55135fbb3929a1440440334f +size 1407727 diff --git "a/images/espa\303\261ita.png" "b/images/espa\303\261ita.png" new file mode 100644 index 0000000000000000000000000000000000000000..39e466580f25204343092ce131897af513817ac9 Binary files /dev/null and "b/images/espa\303\261ita.png" differ diff --git a/images/flag-of-spain.png b/images/flag-of-spain.png new file mode 100644 index 0000000000000000000000000000000000000000..a77982f582e6385dd405f7b12430576bf1b0896c Binary files /dev/null and b/images/flag-of-spain.png differ diff --git a/images/red-black-brush-stroke-banner-background-perfect-canva.jpg b/images/red-black-brush-stroke-banner-background-perfect-canva.jpg new file mode 100644 index 0000000000000000000000000000000000000000..aaf27f73565e8dc1d76adf01ad621327fc7e24cc --- /dev/null +++ b/images/red-black-brush-stroke-banner-background-perfect-canva.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d2aa51a4ab4d622b6c72e5da1ded904d8ed1d5e4fafa6fe70e1608c8ac72841 +size 17250609 diff --git a/images/spain_flag.png b/images/spain_flag.png new file mode 100644 index 0000000000000000000000000000000000000000..f2475cf94fcb9bc5460fb419a31a8678ac5453d2 Binary files /dev/null and b/images/spain_flag.png differ diff --git a/images/tensor.png b/images/tensor.png new file mode 100644 index 0000000000000000000000000000000000000000..65f4210ddda9e68228b5fe738b83b65c7ef8ecb2 Binary files /dev/null and b/images/tensor.png differ diff --git a/images/united_kingdom_flag.png b/images/united_kingdom_flag.png new file mode 100644 index 0000000000000000000000000000000000000000..5ed2c86de3dc377f04310d59ef3c6e510622e4db Binary files /dev/null and b/images/united_kingdom_flag.png differ diff --git a/images/vgg19.png b/images/vgg19.png new file mode 100644 index 0000000000000000000000000000000000000000..21f4bbfbcf4b359db11ec3c08ee528563689439b Binary files /dev/null and b/images/vgg19.png differ diff --git a/main.py b/main.py new file mode 100644 index 0000000000000000000000000000000000000000..5e6bcdbc0dc196ba5f1c3421a115b57a984f6ae5 --- /dev/null +++ b/main.py @@ -0,0 +1,104 @@ +# -*- coding: utf-8 -*- +""" +Created on Fri Dec 30 11:25:05 2022 + +@author: Usuario +""" + +import imagen_subida as ims +import streamlit as st +from keras.models import load_model +from tensorflow.keras.utils import load_img +import sys +import os +import about_pj as pj +import about_us as us +import main_page as mp +#Fondo de streamlit +ims.add_bg_from_url() + +if 'param' not in st.session_state: + st.session_state.param = 1 + +def about_project(): + pj.textito(language_button) + +def ab_us(): + us.unodinoi(language_button) + +def language(): + language_button = ims.idioma() + return language_button + +def main_page(param): + + if param == 1: + mp.main_page(language_button, label_names) + + elif param == 2: + pj.textito(language_button) + + elif param == 3: + us.unodinoi(language_button) + + +#SIDEBAR OPTIONS ====================================== +with st.sidebar: + + #cambiar color de los botones + m = st.markdown(""" + """, unsafe_allow_html=True) + + param = 1 + + col1, col2, col3, col4, col5 = st.columns([20,60,40,60,20]) + + with col2: + st.image('./images/spain_flag.png', width = 60) + with col3: + language_button = language() + with col4: + st.image('./images/united_kingdom_flag.png', width = 60) + + st.markdown("***") + + _, colb, _ = st.columns([10,60,20])#([50,80,50]) + with colb: + botones = ims.botoncitos(language_button) + home = st.button(' Home 🏠 ') + project_button = st.button(label = botones[0])#(label = 'About the project 📕') + us_button = st.button(label = botones[1])#' About us 🧝♂️ ') + + st.markdown('---') + +#======================================================= + + + +if language_button == 1: + label_names = ['Basophil', 'Eosinophil', 'Erythroblast', 'Immature gralulocyte', 'Lymphocyte', 'Monocyte', 'Neutrophil', 'Platelet'] +else: + label_names = ['Basófilo', 'Eosinófilo', 'Eritoblasto', 'Granulocitos inmaduros', 'Linfocito', 'Monocito', 'Neutróofilo', 'Plaqueta'] + + + +if home: + st.session_state.param = 1 + st.experimental_rerun() +elif project_button: + st.session_state.param = 2 +elif us_button: + st.session_state.param = 3 + +main_page(st.session_state.param) + + diff --git a/main_page.py b/main_page.py new file mode 100644 index 0000000000000000000000000000000000000000..dcbcb6ad0b16b91fa8a10aba994228e622428271 --- /dev/null +++ b/main_page.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +""" +Created on Tue Dec 27 16:16:06 2022 + +@author: Usuario +""" +import streamlit as st +import imagen_subida as ims +from keras.models import load_model +from os import system +#Cargar el modelo +import os +import patoolib +from shutil import rmtree +from os import remove + +if os.path.isdir("./model_subir/model") == True: + rmtree("./model_subir/model/") +if os.path.isfile("./model_subir/test_model.zip") == True: + remove("./model_subir/test_model.zip") +os.system("cat ./model_subir/vgg19_trainable_true_best_model_pruebita.7z.* > ./model_subir/test_model.zip") + + +patoolib.extract_archive("./model_subir/test_model.zip",outdir="./model_subir/model/") +#model = load_model('../../../model/classification/vgg19_trainable_true_best_model.h5') +model = load_model('./model_subir/model/vgg19_trainable_true_best_model.h5') + +size = (224, 224) + +def main_page(clicked, label_names): + title = ims.change_title(clicked) + labs = ims.change_labels(clicked) + column1, column2 = st.columns(2) + holder_up = st.empty() + + with column1: + st.write('') + uploaded_image = holder_up.file_uploader('') + + holder_add_text = st.empty() + with column2: + additional_text = '' #holder_add_text.write('In order to estimate which is the classification of your image, drop your file at the left') + + if uploaded_image: + #container = st.container() + add_tex = ims.additional_text_chart(clicked) # + st.write(add_tex) + result_texts = ims.result_text(clicked) + ims.resultados(uploaded_image, model, size, label_names, labs, result_texts) + #container.markdown(res) + holder_up.empty() + holder_add_text.empty() \ No newline at end of file diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.001 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.001 new file mode 100644 index 0000000000000000000000000000000000000000..d7e33fd86a9d0936d3dfbe43790e2d7cdc77939a --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.001 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b24b500eee027847902a749e52b08caed144349ae3044ffead4e9ff36843501f +size 10485760 diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.002 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.002 new file mode 100644 index 0000000000000000000000000000000000000000..5c05f8eb756e9c382d26ab99fbf1c67902bbf877 --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.002 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72051dc3fd5f815781313644047ef4fbdee6625feb9cec76ea17347065d215e6 +size 10485760 diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.003 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.003 new file mode 100644 index 0000000000000000000000000000000000000000..7fcff57d71b6cfc16790e276224e6d3ccf9dbf1d --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.003 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02a733afcdc588a21512b0d5c8a7d0ab105f2807c32aadf4cee3ec6f88c6d735 +size 10485760 diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.004 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.004 new file mode 100644 index 0000000000000000000000000000000000000000..94fbf498bf5ead9eff81318e0059cf6bb491a758 --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.004 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f52ab4c5ab2ec8ea1a14cc8381d95e70b499a6117c2198123b788c1eeb60375a +size 10485760 diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.005 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.005 new file mode 100644 index 0000000000000000000000000000000000000000..a3dfec97e7dd29f5362d5cff4ffe276d1b4d96ab --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.005 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bd79bcbc773070a48f0791b5548e254e561def11303c528a8ccf707280dca1b +size 10485760 diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.006 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.006 new file mode 100644 index 0000000000000000000000000000000000000000..5aa5ac0a22ace22fd7d7ab590cbf3353d07b1a3a --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.006 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69343f6e1a02629b049e9cdcf775ea71de32c3407c24aa2836838a3d1c0a020b +size 10485760 diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.007 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.007 new file mode 100644 index 0000000000000000000000000000000000000000..e043167e3843df320d0a0ba4e5c8d0e764e61f19 --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.007 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f3617f5ce587fce7c9f1e1a8ca920d64ab842fab37d7129964842dafb142f8a +size 10485760 diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.008 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.008 new file mode 100644 index 0000000000000000000000000000000000000000..c26b9415eec1d5dd9d5fa15297612ab77b3a859a --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.008 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78f716ad325a9f642fe6044bb99ceb5bd32533244eb4524799b01f2178e80581 +size 10485760 diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.009 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.009 new file mode 100644 index 0000000000000000000000000000000000000000..fac3a4c5e4d4ede8e298999504e3e449a118ccdd --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.009 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b10cebf7e91070d38721c3f0d595f29ae445399c349501986fd71d2ff045aca +size 10485760 diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.010 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.010 new file mode 100644 index 0000000000000000000000000000000000000000..5ea974f91e2094959caafff87c03f0bbd02cf77e --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.010 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec7996f448c8fec7be4f25dc180fad5f5364e6937da170a2db0c8ca973b45aaa +size 10485760 diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.011 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.011 new file mode 100644 index 0000000000000000000000000000000000000000..759da46624ab388bb764c1914513a49d6ccec45f --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.011 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91e49ff13bcac7fcc80b20862c5debab4734a735f0c8e1037fd85af26f7bdb3d +size 10485760 diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.012 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.012 new file mode 100644 index 0000000000000000000000000000000000000000..9bbfa10357abb01bbfa886591b1f819381c4c7b5 --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.012 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f488501819d20819a2ef5b7662db198669c332a32e0b71c356295ab62f29b060 +size 10485760 diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.013 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.013 new file mode 100644 index 0000000000000000000000000000000000000000..d5e1f3c062d2fdc7ac97e23c2f4a5c6403d1aa6a --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.013 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23a725220df379f784d956d8408f5578a7c9cf3cbfd595a6a53fc5677746ba93 +size 10485760 diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.014 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.014 new file mode 100644 index 0000000000000000000000000000000000000000..7dab05b64b59f7118d6729678ea66262932d6c44 --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.014 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31aa7f2f116de2a026bf23245c4b2128cf97e8f4ec3b41d81a658dca40bdb4fa +size 10485760 diff --git a/model_subir/vgg19_trainable_true_best_model_pruebita.7z.015 b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.015 new file mode 100644 index 0000000000000000000000000000000000000000..9caeab87acc4e1faa829d19c2e4528e8fd2b9231 --- /dev/null +++ b/model_subir/vgg19_trainable_true_best_model_pruebita.7z.015 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3de49347fdcb8d0c6d3e5dcc2987cca681b9862964e1d69ac6fe0c4f5c16932c +size 3824883 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..dfb1858f2a309505a5ead110440d4e9eb4034f5b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,107 @@ +absl-py==1.3.0 +altair==4.2.0 +appdirs==1.4.4 +astunparse==1.6.3 +atomicwrites==1.4.0 +backports.weakref==1.0.post1 +bkcharts==0.2 +black==19.10b0 +blinker==1.5 +bokeh==2.4.3 +brotlipy==0.7.0 +certifi==2021.10.8 +commonmark==0.9.1 +comtypes==1.1.10 +constantly==15.1.0 +cssselect==1.1.0 +cytoolz==0.11.0 +docker-pycreds==0.4.0 +docopt==0.6.2 +et-xmlfile==1.1.0 +flatbuffers==22.10.26 +fonttools==4.25.0 +gast==0.4.0 +gitdb==4.0.9 +GitPython==3.1.29 +google-auth-oauthlib==0.4.6 +google-pasta==0.2.0 +inflection==0.5.1 +ipython==8.2.0 +ipython-genutils==0.2.0 +keras==2.10.0 +Keras-Preprocessing==1.1.2 +libclang==14.0.6 +llvmlite==0.38.0 +matplotlib==3.5.1 +matplotlib-inline==0.1.2 +mccabe==0.6.1 +mkl-fft==1.3.1 +mkl-service==2.4.0 +mpmath==1.2.1 +munkres==1.1.4 +mypy-extensions==0.4.3 +oauthlib==3.2.2 +openai==0.26.0 +opencv-contrib-python==4.6.0.66 +opencv-python==4.7.0.68 +opt-einsum==3.3.0 +pathspec==0.7.0 +pathtools==0.1.2 +patool==1.12 +patsy==0.5.2 +pep8==1.7.1 +Pillow==9.0.1 +pipreqs==0.4.11 +plumbum==1.7.2 +ply==3.11 +pyarrow==10.0.0 +pyasn1-modules==0.2.8 +pycosat==0.6.3 +pydeck==0.8.0 +PyDispatcher==2.0.5 +pylake==0.1.4 +pyls-spyder==0.4.0 +Pympler==1.0.1 +pyreadline==2.1 +pytest==7.1.1 +python-lsp-jsonrpc==1.0.0 +python-lsp-server==1.2.4 +pytz==2021.3 +pytz-deprecation-shim==0.1.0.post0 +PyYAML==6.0 +queuelib==1.5.0 +requests-oauthlib==1.3.1 +rich==12.6.0 +seawater==3.3.4 +semver==2.13.0 +sentry-sdk==1.14.0 +setproctitle==1.3.2 +smmap==5.0.0 +split-folders==0.5.1 +st-click-detector==0.1.3 +statsmodels==0.13.2 +streamlit==1.14.1 +streamlit-toggle-switch==1.0.2 +tables==3.6.1 +tabulate==0.8.9 +tensorboard==2.10.1 +tensorboard-data-server==0.6.1 +tensorboard-plugin-wit==1.8.1 +tensorflow==2.10.0 +tensorflow-estimator==2.10.0 +tensorflow-io-gcs-filesystem==0.27.0 +termcolor==2.1.0 +thop==0.1.1.post2209072238 +torch==1.13.1 +torchvision==0.14.1 +tzdata==2022.6 +tzlocal==4.2 +urllib3==1.26.14 +validators==0.20.0 +wandb==0.13.9 +webencodings==0.5.1 +wget==3.2 +win-unicode-console==0.5 +wincertstore==0.2 +yarg==0.1.9 +zict==2.0.0