(Created page with "<html> <head> <link rel="stylesheet" type="text/css" href="https://2018.igem.org/Template:Groningen/CSS&action=raw&ctype=text/css" /> <link rel="stylesheet" type="text/css"...") |
Bramwiggers (Talk | contribs) |
||
Line 1: | Line 1: | ||
<html> | <html> | ||
<head> | <head> | ||
− | <link rel="stylesheet" type="text/css" | + | <link rel="stylesheet" type="text/css" |
− | href="https://2018.igem.org/Template:Groningen/CSS&action=raw&ctype=text/css" /> | + | href="https://2018.igem.org/Template:Groningen/CSS&action=raw&ctype=text/css" /> |
− | <link rel="stylesheet" type="text/css" | + | <link rel="stylesheet" type="text/css" |
− | href="https://2018.igem.org/Template:Groningen/CSS/materialize&action=raw&ctype=text/css" /> | + | href="https://2018.igem.org/Template:Groningen/CSS/materialize&action=raw&ctype=text/css" /> |
− | <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> | + | <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> |
− | <script type="text/javascript" src="https://2018.igem.org/Template:Groningen/Javascript&action=raw&ctype=text/javascript"></script> | + | <script type="text/javascript" src="https://2018.igem.org/Template:Groningen/Javascript&action=raw&ctype=text/javascript"></script> |
</head> | </head> | ||
<body> | <body> | ||
− | <!-- BEGIN CONTENT ---------------------------------------------------> | + | <!-- BEGIN CONTENT ---------------------------------------------------> |
− | <div class="igem_2018_team_content" style="background-color: white"> | + | <div class="igem_2018_team_content" style="background-color: white"> |
+ | |||
+ | <div class="igem_2018_team_column_wrapper"> | ||
+ | <div class="column"> | ||
+ | <h1>Buffy the Bufferbot</h1> | ||
+ | </div> | ||
+ | |||
+ | <div class="clear_extra_space"></div> | ||
+ | |||
+ | |||
+ | <div class="column two_thirds_size"> | ||
+ | <h4>Introduction </h4> | ||
+ | <p>Buffy the Bufferbot is designed as a example of how Artificial Intelligence can be used to make work in the lab easier. The objective of the robot is to get an unknown buffer and add enough base or acid until it reaches the right pH. The goal is to make a plug-and-play, low cost robot, to lower the efforts of the people in the lab. For now Buffy only works in simulation, and is not very robust, but in the future, we hope that Buffy will have a body so it can help people all over the world. </p> | ||
+ | </div> | ||
+ | |||
+ | <div class="column third_size"> | ||
+ | <div class="clear extra_space"></div> | ||
+ | <img src="Buffy............."> | ||
+ | </div> | ||
+ | <div class="clear extra_space"></div> | ||
+ | <div class="line_divider"></div> | ||
+ | <div class="clear_extra_space"></div> | ||
+ | |||
+ | |||
+ | |||
+ | <div class="column third_size"> | ||
+ | <div class="clear extra_space"></div> | ||
+ | <img src="words thing noa......."> | ||
+ | </div> | ||
+ | |||
+ | <div class="column two_thirds_size"> | ||
+ | <h4>How to use the simulation </h4> | ||
+ | <p>As buffy is properly packaged, it can be installed directly from the source by running “pip install git+https://github.com/Ezmagon/buffy” in a command line terminal. A wrapper script to run the buffy simulation is then added to your path and can be run using “buffy_run.py”. The program opens a TKinter window to accept the goal pH as input. This is the only input that is needed as buffy is able to derive all the other system parameters by itself. When computer vision is pressed in the next window, it starts the simulation of how the finished computer vision will be able to automatically read the current pH of the buffer from an existing pH meter. The system incrementally shows how the algorithm approaches the correct area of the image and reads the numbers. When a key is pressed, the simulation windows opens. </p> | ||
+ | </div> | ||
+ | |||
+ | <div class="clear extra_space"></div> | ||
+ | <div class="line_divider"></div> | ||
+ | <div class="clear_extra_space"></div> | ||
+ | |||
+ | |||
+ | <div class="column two_thirds_size"> | ||
+ | <h4>Results </h4> | ||
+ | <p>The simulation window shows the underlying (real) buffer pH curve in orange that is being simulated. Just like in the future hardware version of buffy, it doesn’t know this curve beforehand. Buffy will start to add acid or base depending on whether the pH has to increase or decrease. The new pH of the buffer is recorded. As buffy records more data points, it is able to fit a third order polynomial to the data points, shown as the green line. The fit gets progressively more accurate as more data points are gathered. Despite the addition of random noise to the data points, buffy is able to accurately predict the real underlying pH curve of the buffer. Using this fit it is possible to make increasingly accurate predictions of how much acid or base to add to the solution, drastically reducing the time required to adjust a buffer manually. </p> | ||
+ | </div> | ||
+ | |||
+ | <div class="column third_size"> | ||
+ | <div class="clear extra_space"></div> | ||
+ | <img src="Picture of graphs............."> | ||
+ | </div> | ||
+ | <div class="clear extra_space"></div> | ||
+ | <div class="line_divider"></div> | ||
+ | <div class="clear_extra_space"></div> | ||
+ | |||
+ | |||
+ | <div class="column"> | ||
+ | <h1>A look in the brain of the robot!</h1> | ||
+ | </div> | ||
− | |||
<div class="column two_thirds_size"> | <div class="column two_thirds_size"> | ||
− | < | + | <h4>The simulation</h4> |
− | + | <p>To be able to properly simulate the pH curve of the buffer, the “real” buffer pH has to be approximated by a continuous function. The well established Henderson-Hasselbalch equation (<i>pH = pKa + log10 ([A-]/[HA])</i>) was used to generate data points within the range of the buffer. However, this function tends to infinity as one of the buffer components approaches zero. Therefore the rest of the data points were linearly approximated. A third order polynomial was fit to the data points to yield a continuous function that could be used to approximate the pH range across the entire pH range. </p> | |
− | + | ||
</div> | </div> | ||
<div class="column third_size"> | <div class="column third_size"> | ||
<div class="clear extra_space"></div> | <div class="clear extra_space"></div> | ||
− | <img src=" | + | <img src="Picture of graphs............."> |
</div> | </div> | ||
+ | <div class="clear extra_space"></div> | ||
+ | |||
+ | <div class="column two_thirds_size"> | ||
+ | <h4>Observe</h4> | ||
+ | <p>The computer vision algorithm uses different techniques to find the number on the screen. The amount of deep learning is minimized, as we want to make Buffy as memory efficient as possible. (1) First , the algorithm uses a Gaussian blur to smoothen out the noise in the camera view. (2) After this, the Canny Edge Detection algorithm is used, and this way the edges are clear for Buffy. (3) Now, the contours are found, and the biggest ones are marked. After this, it focuses on the biggest contour to find the pH meter. (4) After this, the process is repeated to find the screen of the pH meter. Then, after the Canny Edge Detection is used, (5) Buffy looks for contours of the right size to find the numbers. (6) If the numbers are found, the area of interest is taken out and put into a Neural Network trained on recognizing ResNet numbers. This returns the number of the pH meter. </p> | ||
+ | </div> | ||
+ | |||
+ | <div class="column third_size"> | ||
<div class="clear extra_space"></div> | <div class="clear extra_space"></div> | ||
− | <div class=" | + | <img src="Picture of graphs............."> |
− | <div class=" | + | </div> |
+ | <div class="clear extra_space"></div> | ||
+ | |||
+ | <div class="column two_thirds_size"> | ||
+ | <h4>Predict the polynomial of the buffer</h4> | ||
+ | <p>To predict the polynomial of the buffer, Buffy has to predict where the buffer is, as the pH curve is not linear. Therefore we gave it knowledge of the buffer curve, which is that all buffers are polynomials to the 3rd degree. Therefore, Buffy expects a line in the form of ax3 + bx2 + cx + d = y. To give the user insight in the knowledge of Buffy, the line is projected over the real line, and over time we can see it is learning, and coming closer to the right point. </p> | ||
+ | </div> | ||
+ | |||
+ | <div class="column third_size"> | ||
+ | <div class="clear extra_space"></div> | ||
+ | <img src="Picture of graphs............."> | ||
+ | </div> | ||
+ | <div class="clear extra_space"></div> | ||
+ | |||
</div> | </div> | ||
Revision as of 15:34, 17 October 2018
Buffy the Bufferbot
Introduction
Buffy the Bufferbot is designed as a example of how Artificial Intelligence can be used to make work in the lab easier. The objective of the robot is to get an unknown buffer and add enough base or acid until it reaches the right pH. The goal is to make a plug-and-play, low cost robot, to lower the efforts of the people in the lab. For now Buffy only works in simulation, and is not very robust, but in the future, we hope that Buffy will have a body so it can help people all over the world.
How to use the simulation
As buffy is properly packaged, it can be installed directly from the source by running “pip install git+https://github.com/Ezmagon/buffy” in a command line terminal. A wrapper script to run the buffy simulation is then added to your path and can be run using “buffy_run.py”. The program opens a TKinter window to accept the goal pH as input. This is the only input that is needed as buffy is able to derive all the other system parameters by itself. When computer vision is pressed in the next window, it starts the simulation of how the finished computer vision will be able to automatically read the current pH of the buffer from an existing pH meter. The system incrementally shows how the algorithm approaches the correct area of the image and reads the numbers. When a key is pressed, the simulation windows opens.
Results
The simulation window shows the underlying (real) buffer pH curve in orange that is being simulated. Just like in the future hardware version of buffy, it doesn’t know this curve beforehand. Buffy will start to add acid or base depending on whether the pH has to increase or decrease. The new pH of the buffer is recorded. As buffy records more data points, it is able to fit a third order polynomial to the data points, shown as the green line. The fit gets progressively more accurate as more data points are gathered. Despite the addition of random noise to the data points, buffy is able to accurately predict the real underlying pH curve of the buffer. Using this fit it is possible to make increasingly accurate predictions of how much acid or base to add to the solution, drastically reducing the time required to adjust a buffer manually.
A look in the brain of the robot!
The simulation
To be able to properly simulate the pH curve of the buffer, the “real” buffer pH has to be approximated by a continuous function. The well established Henderson-Hasselbalch equation (pH = pKa + log10 ([A-]/[HA])) was used to generate data points within the range of the buffer. However, this function tends to infinity as one of the buffer components approaches zero. Therefore the rest of the data points were linearly approximated. A third order polynomial was fit to the data points to yield a continuous function that could be used to approximate the pH range across the entire pH range.
Observe
The computer vision algorithm uses different techniques to find the number on the screen. The amount of deep learning is minimized, as we want to make Buffy as memory efficient as possible. (1) First , the algorithm uses a Gaussian blur to smoothen out the noise in the camera view. (2) After this, the Canny Edge Detection algorithm is used, and this way the edges are clear for Buffy. (3) Now, the contours are found, and the biggest ones are marked. After this, it focuses on the biggest contour to find the pH meter. (4) After this, the process is repeated to find the screen of the pH meter. Then, after the Canny Edge Detection is used, (5) Buffy looks for contours of the right size to find the numbers. (6) If the numbers are found, the area of interest is taken out and put into a Neural Network trained on recognizing ResNet numbers. This returns the number of the pH meter.
Predict the polynomial of the buffer
To predict the polynomial of the buffer, Buffy has to predict where the buffer is, as the pH curve is not linear. Therefore we gave it knowledge of the buffer curve, which is that all buffers are polynomials to the 3rd degree. Therefore, Buffy expects a line in the form of ax3 + bx2 + cx + d = y. To give the user insight in the knowledge of Buffy, the line is projected over the real line, and over time we can see it is learning, and coming closer to the right point.