miércoles, 5 de agosto de 2020

Sistema RPA: UiPath


UIPATH

1. Proceso de instalación








2. Requerimientos de HW y SW


  • Hardware

  • Software






3. Costos y beneficios

Costo: 
Se ha utilizado para este tutorial la versión gratuita del software. 
En cuanto a su versión de paga, la página oficial cotiza las características de la empresa que lo necesita para dar precios exactos, sin embargo en línea se puede conseguir a alrededor de $3990.

Beneficios:
  • Implementación en cualquier lugar
En la nube o local, con equipos físicos o virtuales, permite empezar desde abajo y escalar rápidamente de forma fácil y práctica.


  • Optimización de la escalabilidad
Las prioridades cambian. La carga de trabajo cambia. Orchestrator monta robots en colas y los asigna para que trabajen con precedencia relativa

  • Colaboración con privacidad
Los distintos equipos empresariales de una organización global trabajan de forma privada y segura en proyectos de RPA con capacidades multitenencia.

  • Mano de obra digital segura
Con control de acceso basado en roles (RBAC), los procesos están accesibles para los usuarios de forma selectiva, en función del rol del usuario en la organización. Los robots obtienen de forma segura todas las credenciales almacenadas en CyberArk Vault, que cuenta con la confianza de la mayoría de las empresas de Fortune 100.

  • Auditoría integral para mejorar sobre la marcha
Todas las actividades de los robots y los usuarios quedan registradas en Orchestrator para una visibilidad profunda del rendimiento, con potentes funciones de análisis en tiempo real que se expresan visualmente.

5. Planteamiento del problema. 


El RPA trae consigo grandes ventajas, al ser una tecnología que permite configurar un software o "robot" para controlar e interpretar las aplicaciones existentes permite así procesar una transacción, manipular datos, desencadenar respuestas y comunicarse con otros sistemas digitales. El ser humano debe realizar actividades requieren procesos repetitivos que cosumen gran cantidad de recursos y de mano de obra. Ante esta situación se han creado estas herramientas RPA que facilitan que se lleven a cabo todas las actividades sin utilizar muchos recursos o mano de obra


6. Paso a paso el uso de la herramienta RPA. 


  • Se programan los procesos basándose en bloques:
  • Para abrir una aplicación se utiliza el bloque “Abrir aplicación”:

  • Se establece que aplicación abrir clickeando en “Indicar ventana en la pantalla” seguido y un click en la ventana de la aplicación.

  • En el cuadro “Do” se indica todas las acciones que se harán dentro de la aplicación, por ejemplo, ejecutar una tecla especifica con el cuadro “Enviar tecla de acceso rápido”.


  • Se puede escribir un texto especifico desde de un cuadro de texto indicando donde se encuentra dicho cuadro.


  • Al igual que asignar texto asigna posición de click, doble click o click derecho en un lugar de la aplicación abierta.



  • Para leer un archivo CSV tenemos la actividad “Leer CSV”, la que recibe como parámetros el path del archivo a leer y una variable donde se guardaran los datos leidos.
  • Para recorrer los datos leidos se usa la actividad “Para cada fila”.

  • Se puede realizar expresiones IF utilizando el lenguaje VB.

  • Para la ejecución del proceso se puede presionar el botón “Depurar arcihvo” o presionando la tecla F10, y F11 para saltar paso por paso



7. Conclusiones y recomendaciones. 


La utilización de RPA trae grandes ventajas pues son herramientas faciles de probar y de fácil aprendimiento. UiPath presenta cientos de actividades integradas que se pueden personalizar y compartir, así como prestaciones de integración profunda con tecnologías ERP, BPM y AI.Además, ha demostrado ofrecer prestaciones de diseño e implementación de automatizaciones con más de un 40 % más de rapidez. 

En general os RPA son las herramientas de automatización del futuro (y podría decirse del presente) y las que se deberían de utilizar, desde ya, en cualquier proyecto de software. Al principio, se tendrá la sensación de que la inversión de dinero es grande, pero cuando se vean sus ventajas como poder ejecutar tareas repetitivas tantas veces como se quiera, ayudándonos a ganar ese valioso tiempo, del que no disponemos, nos daremos cuenta del ahorro, en todos los sentidos, que obtenemos con un RPA como UIPath.

8. Resultados 

La instalación del software UiPath, es relativamente fácil, se siguen unicamente los pasos que ya consigo trae el programe. Para este tutorial el software se instaló sin ningún tipo de problema. En cuanto al uso, UiPath es sencillo y practico, todas las herramientas básicas están a la vista del usuario, conforme este vaya necesitando herramientas irá aprendiendo su ubicación y uso. 




martes, 4 de agosto de 2020

Implementation of an artificial vision system to track objects using algorithms to extract global and local characteristics.




1. Abstract


Object recognition is the task of automatically finding and identifying objects in an image. Humans detect and recognize objects in images with extreme ease, even if the objects undergo variations in shape, size, location, color, texture, brightness or are partially obstructed. However this is a difficult task for computer vision. Therefore, various methods have been developed that attempt to achieve perfection in the human eye. In this project, the study of two image identification techniques (hu and Surf moments) was carried out, to determine what are the advantages that each one presents and the steps for its implementation.


2. Objective 

Reinforce the knowledge acquired in class about working with the stages of image preprocessing and extraction of local and global characteristics in order to carry out object tracking tasks.


3. Introduction

Today the use of technology is vital. Therefore, significant advances are made daily in the application of technologies in various sciences. One of the areas in which it is working is the creation of fast, expert and autonomous computers.

One of the most ambitious goals is to give computers the ability to relate to their environment in the same way that humans do, that is, through the senses. Providing sensory capacity to a computer is a complicated task. Accessory elements to the microprocessor are needed such as sensors, signal or noise cards, etc. In this way, there is a special interest in one of the five senses: the ability to see.



  • Artificial Vision

Artificial vision refers to the technology (usually, visual implants) that allows blind people to see. The main aim of visual implants is to relay pictures to the brain using either cameras or photoreceptor arrays. There are different types of implants used to stimulate vision: retinal, cortical and biohybrid. None of the currently available technologies restores full vision, but they are often able to improve ones ability to recognize shapes and movements.



The retina is a thin layer of neural tissue that lines the back wall inside the eye. Some of these cells act to receive light, while others interpret the information and send messages to the brain through the optic nerve. This is part of the process that enables you to see. In damaged or dysfunctional retinas, the photoreceptors stop working, causing blindness. By some estimates, there are more than 10 million people worldwide affected by retinal diseases that lead to loss of vision.

Until now, those who lost their vision to retinal disease would have had little hope of regaining it. But technological breakthroughs could soon give back the gift of sight. Several groups of scientists have already developed silicon microchips that can create artificial vision. In this article, we will examine how your retinas work and why blindness caused by retinal disease no longer means the loss of vision (Bonsor, 2000).

When addressing an object recognition problem, a basic five-step process is commonly followed:

a. Image acquisition
Capture the real world scene through sensors and digitize it for processing, storage and transmission.

b. Preprocessing
Applying contrast enhancement techniques, noise reduction, feature enhancement, etc., so that the image is suitable for the following steps.

c. Segmentation
Isolate the objects of interest in the image.

d. Feature extraction:
Numerically describe the nature of the segmented objects such as their shape, color, texture, etc.

e. Classification
Assign a class or category to each image object based on its features.

There are several techniques that use algorithms to identify images, in this project we used:


  • Global characteritics
Moments Hu 

The characteristic shape of an object can be quantified by moments, which describe how the pixels of an object are distributed over the image plane. Moments must be invariant (ie, similar values for objects of the same type) to the geometric transformations (translation, rotation and scaling) that the objects can undergo and at the same time must be discriminant (ie, different values for objects of different types). These features are desirable for easier recognition of objects.

The moments of Hu are a set of seven invariant descriptors that quantify the shape of an object.

  • Local characteristics
SURF  (Speeded Up Robust Feature)

SURF is a robust local feature detector, first introduced by Herbert Bay in 2006, that can be used in computer vision tasks such as object recognition or 3D reconstruction. It is largely inspired by the SIFT descriptor. The standard version of SURF is much faster than SIFT and its authors claim that it is more robust against transformations in different images than SIFT. SURF is based on the sums of Haar's 2D wavelet model responses and makes efficient use of integral images.


An integer approximation is used for the Hessaino detector determinant (Hessian blob detector), which can be calculated extremely quickly with an integral image since there are three integer operations. For features, use the sum of the Haar wavelet response around the point of interest. Again, these can be calculated with the help of the integral image.


4. Development and results

All the methods where implemented in OPEN CV:



  • Global characteristics (Hu Moments)
HSV value acquisition for each figure, three figures with three diferents colors were analyce:

A tree_yellow
A house_red
A cloud_blue


Yellow Tree HSV

Blue Cloud HSV

Red House HSV


Detection of the images:








  • Local characteristics (SURF)
For this method, three images (symbols) were selected:


National coat of arms of Ecuador

Real Madrid shield

Burger King Logo



5. Conclusion

New technologies are increasingly incorporated into our daily lives. Applications such as biometric fingerprint control or digital cameras to recognize faces are now a reality thanks to the advances in Computer Vision, one of the branches of Artificial Intelligence that has experienced the greatest growth in recent years.

This techniques are very important in the new reality that we are living. Thus is really important that people do research and get involved in the creation of new technologies, building on existing methods such as SURF or Hu moments. Which are really easy methods to implement.


6. Bibliography


Bonsor, K. (2000, octubre 16). How Artificial Vision Will Work. HowStuffWorks. https://science.howstuffworks.com/innovation/everyday-innovations/artificial-vision.htm

La visión por computador: Una disciplina en auge. (2012, abril 19). Informatica ++. http://informatica.blogs.uoc.edu/2012/04/19/la-vision-por-computador-una-disciplina-en-auge/

Sistemas de visión por computadora para el control de calidad. (2015). https://www.milenio.com/opinion/varios-autores/universidad-politecnica-de-tulancingo/sistemas-de-vision-por-computadora-para-el-control-de-calidad

domingo, 14 de junio de 2020

Development of a neural network with forward connection to classify Nepali writing patterns (OCR)



1. Objective

Design and program neural networks based on the Multilayer Perceptron as a pattern classification tool.



2. Theoretical part

Neural Networks

  • Definition
Neural networks are massively parallel interconnected networks of simple (usually adaptive) elements and with hierarchical organization, which try to interact with real-world objects in the same way that the biological nervous system does.

  •  Advantage
-Adaptive Learning
Ability to learn, to perform tasks based on training or initial experience

-Self-organization
A neural network can create its own organization or representation of the information that it receives through a learning stage.

-Fault tolerance
The partial destruction of a network leads to a degradation of its structure; however, some network capabilities can be retained, even suffering great damage

-Real-time operation
Neural computations can be performed in parallel; For this, machines with special hardware are designed and manufactured to obtain this capacity.

-Easy insertion into existing technology
You can obtain specialized chips for neural networks that improve their capacity in certain tasks. This will facilitate modular integration into existing systems.


  • Basic elements of a neural network
Example of a fully connected neural network.

It is made up of neurons interconnected and arranged in three layers (the latter may vary). Data enters through the "input layer", passes through the "hidden layer" and exits through the "output layer". It is worth mentioning that the hidden layer can be made up of several layers.

  • Neural network applications
Neural networks can be used in a large number and variety of applications, both commercial and military:

-Biology: Learn more about the brain and other systems, obtain retinal models.

-Company: Evaluation of the probability of geological and oil formations, identification of candidates for specific positions, exploitation of databases, etc.

-Environment: Analyze trends and patterns or weather forecast (climate).

-Medicine: - Speech analyzers to aid in hearing for deaf people, diagnosis and treatment based on symptoms and / or analytical data, monitoring in surgeries, etc.

Most of these applications consist of performing a pattern recognition, such as: looking for a pattern in a series of examples, classifying patterns, completing a signal from partial values, or reconstructing the correct pattern from a distorted one

Keras 

Keras is a high-level API from TensorFlow to build and train deep learning models. It is used for rapid prototyping, state-of-the-art research, and production, with three key benefits:
  • User friendly
Keras has a simple and consistent interface optimized for common use cases. Provides clear and actionable information about user errors.
  • Modular and configurable
Keras models are manufactured by connecting configurable building blocks to each other, with few restrictions.
  • Easy to extend
Write custom building blocks to express new ideas for research. Create new layers, metrics, loss functions and develop state-of-the-art models


3. Process

  • Read all images in numerical arrangement, at the same time you should normalized the data

  • By using OneHotEncoder () transform the outputs and divide training and test data in 80% and 20% respectively.





  • Create the different neural network configurations and train them




  • With the use of matrix_confusion () determinate the precision of each neural network with respect to the test data 



  • The report is made with the use of the ‘reportlab’ library. The ’matplotlib’ library was used to make the graphs




4. Analysis 

  • Determine which neural network configuration was most effective and which transfer functions had the best results.

Since all settings use the same data for their training, they all have 1024 neurons in the input layer and 46 neurons in the output layer. In all the configurations, the activation function ‘relu’ was used, since in the development of the project it was determined that it was the one with the best results.

-The first neural network has an intermediate layer with 256 neurons
-The second neural network was configured with an intermediate layer with 2048 neurons
-The third neuron was configured with 3 intermediate layers with 256 neurons each one.

The second configuration despite having a single layer compared to the third configuration, has  a better result beacause it reach up  93.99% accuracy in comparation with the  92.93% and 92.43% accuracy of the first and third configuration respectively



  • How the number of neurons affects the given problem? 
Between the configuration of network 1 and configuration 2, as they have the same number of layers, it can be seen that the more neurons we have, the better precision we obtain. However, it should be noted that for this configuration to have better precision, it is necessary that the number of epochs 'epochs' must be greater. While with fewer neurons, it returns good results with few epochs, as you increase its precision it does not improve.

  • What data normalization strategy you used and what was the reason for selecting that strategy.
With the image represented as an array of numbers in a range between 0 and 1, the intermediate values represent the shadows or outlines of the symbol that it represents. We proceeded to round all the numbers in this matrix, in order to simulate that we have a fully black and white image and not a grayscale (shadow)


5. Results





6. Conclusion

  • The best multilayer neural network structure with forward connection was determined to perform pattern classification tasks
  • In addition, the information preprocessing stage (data cleaning, normalization, hot encoding, etc.) was applied correctly to obtain better results in the learning process.

7. Biography

Keras | TensorFlow Core. (s. f.). TensorFlow. Recuperado 14 de junio de 2020, de https://www.tensorflow.org/guide/keras?hl=es-419
Piloto-Rodríguez, R. (2017). Redes Neuronales Artificiales. Conceptos básicos y algunas aplicaciones en Energía. https://doi.org/10.13140/RG.2.2.23326.54083 


domingo, 7 de junio de 2020

Simulación de eventos discretos: JaamSim


Tutorial técnico del uso y proceso de simulación


1. Requerimientos de HW y SW 



JaamSim se ejecutará en la mayoría de las computadoras modernas que admite tengan java 7 o una versión superior y  gráficos OpenGL versión 3.0 o posterior, incluidos computadoras portátiles con procesadores Intel Core i5 e i7 o series que se basan en gráficos integrados.


2. Proceso de configuración e instalación 


JaamSim es una aplicación extremadamente ligera que consta de un solo ejecutable de 10 MB. El ejecutable se puede copiar directamente a la computadora del usuario. No hay un programa de instalación especial necesario. 

Se puede descargar de la siguiente página web https://jaamsim.com/downloads.html, una vez descargado se ejecuta:
Figura 1: Ejecutable JaamSim


El programa ofrece una serie de herramientas entre ellas están el Model Builder que sirve para arrastrar y soltar componentes del modelo: 



Los objetos, como el servidor, se pueden arrastrar desde el generador de modelos directamente a cualquiera de las vistas 3D abiertas. Las paletas y objetos provistos al momento de escribir son:



Una vez instalado el programa se visualiza de la siguiente manera: 
Figura 2: programa JaamSim



3. Tutorial del uso de la herramienta



Modelo de entradas y salidas

JaamSim permite construir modelos a través de la GUI o un archivo de entrada. El archivo de entrada utiliza una estructura de objeto-palabra clave-valor. Por ejemplo, las siguientes líneas de entrada:

Definir nave {LargeShip}
Largo del barco grande {300 m}

definiría el objeto "LargeShip" (una instancia de "Ship") y asignaría el valor de trescientos metros a su entrada de "Longitud". Los cálculos internos se realizan en unidades SI por JaamSim.

El software utiliza anotaciones para codificar este material, lo que hace que el programa se documente en gran medida. 

Ejemplo de servidor cola

El servidor y la cola son dos de los bloques de construcción estándar provistos con cada paquete de simulación. El primer ejemplo para la mayoría del software de simulación es una peluquería, un cajero de banco o algún otro sistema de servidor / cola equivalente: 


El generador crea entidades esféricas y las envía a través de un transportador al servidor. El servidor procesa las entidades y las envía a través de un segundo transportador al sumidero donde se destruyen. Las entidades creadas por el generador son copias de la entidad prototipo y se generan a una velocidad determinada por la distribución del tiempo entre llegadas (IAT). El tiempo de servicio para el servidor está determinado por la distribución del tiempo de servicio. El modelo de servidor y cola proporciona un buen ejemplo para ilustrar algunas de las características básicas de JaamSim.

Tiempo discreto 


La característica definitoria de una simulación de evento discreto es el uso del avance de tiempo del próximo evento, es decir, el tiempo avanza de manera discontinua de un evento al siguiente. Esta lógica es mucho más eficiente y flexible que el tiempo de avance en un incremento fijo


4. Planteamiento y descripción del problema. 



Para aprender de mejor manera el uso y aplicación del programa JaamSim, se plantea como ejemplo el siguiente problema: 


A un lavado de autos llega un automóvil cada 4 minutos. El automóvil cuenta con servicio para lavado de automóvil interno y externo, pero no se sabe hasta que pasan por la cabina principal a que se dirigen. La cabina principal está ubicada en la entrada del autolavado y es quien cobra los importes por cada tipo de lavado. Los lavados interiores se realizan en 10 minutos aproximadamente mientras que los lavados exteriores les toma solamente 5 minutos, luego cada uno sale de la cabina de lavado y se retira del lugar.

Con los datos expuestos y explicado el proceso se debe modelar el sistema. 



5. Proceso de solución. 



  • SimEntity
Entidad que será generada, representará a los automóviles. Es posible declarar variables propias de la entidad




  • Exponential Distribution
Genera valores entre un valor mínimo y un valor máximo, valores que recibe como parámetro

  • DiscreteDistributio
Genera valores discretos de una lista de valores, con una probabilidad asignada a cada una


  • EntityGenerator
Generador de entidades, la frecuencia con la que generará viene dada porsd la probabilidad distribución asignada.

  • Assign
Asigna o modifica las variables de la entidades (asignamos el valor que genere el  Discrete Distribution)


  • Branch
Permite clasificar las entidades basándose en el valor de la variable en la entidad.

  • Queue
Esta cola acumula las entidades hasta que un servidor los consuma.


  • Server
Consume los recursos de las colas, el tiempo que demore en procesar su tarea, viene definida por un objeto ExponentialDistribution

  • EntitySink
Elimina las entidades de la simulación, simula que un cliente sale de la simulación.



6. Resultados 

El modelo del sistema queda estructurado de la siguiente manera: 





7. Conclusiones y recomendaciones



JaamSim es un programa de simulación de eventos discretos de código abierto escrito en el lenguaje de programación Javaque ofrece muchas ventajas entre ellas la velocidad de procesamiento, el ser un software libre, tener una interfaz bastante amigable con el usuario. Por lo que facilita su uso dentro de cualquier área de investigación. 



8. Video explicativo del proceso de simulación y resultados