China3D printingNet, June 15th, the pharmacists in the hospital must concentrate, because they have to deal with all kinds of drugs. They need to ensure the safety of drugs. No matter how hard we try, people are not perfect, so processes like this are always error-prone.One way to solve this problem is to use a pill dispensing system that can be used3D printingmanufacture.Five researchers from Taiwan published a paper entitled “Using3D printingTechnology and Convolutional Neural Network Image Recognition Technology to Develop Smart Pill Box”, the paper refers to the automated system they developed, which makes dispensing more accurate and simple.
“The safety of medication is essential to health care. In this research, we proposed a complete concept of an active smart pill box, which includes a main control unit, a pill dispenser unit and an automatic Application software (app) for distributing medicines. The smart medicine box uses convolutional neural network image recognition and3D printingTechnology.
They designed the system as3D printingMechanism, the mechanism uses an Arduino-based platform to control its movement, and uses a mobile application to set parameters through a smartphone. The application sets the type of medication and the time it should be taken, and then the smartphone will transmit the selected settings to the main platform via Bluetooth.
“The Arduino (master) sends action commands to the Arduino (slave) through MAX485. The Arduino (slave) receives the command and starts to operate. During the Arduino (slave) action, the main Arduino (master) continues to transmit messages to each Arduino (slave), and complete the actions of each Arduino (slave). After the pill is completely dispensed, the main Arduino (master) returns a message to the smartphone to notify the user to take the medicine.
The pill box system is designed in Solidworks and carried out with rotating gears3D printing.
First, use button settings to operate the smart pill box, but in the end, the mobile app will define the pills that should be dispensed, and then set the command for when the drug should be dropped.
In order to increase the number of pill types that can be stored, the Arduino (host) sends instructions to the slave through MAX485 to set the number of each pill and operate the system. According to the number of the pill box, determine when the pill should be dropped. It can be set multiple times, and the user is reminded to take the medicine at these different times.
After setting the amount of medicine to be dispensed, the Arduino controller will issue a command to start the motor and sensor. The motor gear drives the gear connected with the rotating tooth, and then the rotating tooth rotates the pill dispenser. Then, when the pill reaches the chute, it will fall down, and the sensor will count the number of pills dispensed. For each pill dropped, the value on the display will decrease by one.
The other part of the system is the pill image recognition and training model. Three processes are used to identify the picture-identify, find and zoom out-in this case, a camera based on the popular Convolutional Neural Network (CNN) is used to perform these operations and obtain pill images. These images are then transferred to a smartphone application for CNN recognition.
This CNN uses the Googlenet architecture for model training, but it is difficult to achieve data diversity. However, due to the limited background of the objects in the system and no other recognition capabilities, the researchers used the Siamese network, which is “usually used for face recognition and model architecture training.”
The principle is to capture the characteristics of the neural network for image recognition. The final fully connected layer is not entered for classification, but the features are entered as a layer (128, 1). This vector is also called embedding, then the photos of the identified items are discarded, and the photos in the database are selected for the model to obtain the vector (128, 1), and then the two vectors are compared. In order to train the model, first, we must define a loss function to measure the distance between embeddings. Here, we use a triple loss function; there will be three photos: the anchor point and the positive and negative images of the anchor point. “
Since the data set is only a picture of a pill, in order to detect a single pill, multiple images need to be processed, so edge detection can be used to cut out and separate each pill. The model follows the following steps to find the pixel exposed part of the edge:
.
Mask to remove noise and smooth image
.Calculate the horizontal and vertical gradients to find the boundary
.Find the contour
“Find the contour: use the findtour function of cv2; when using the CV_RETR_EXTERNAL parameter, only the outermost contour is used. Input a square image: use the cv2.boundingRect parameter and save it as an image file.
There are still some problems that need to be solved. For example, if too many drugs are loaded, excessive friction will be generated, and due to the “lack of resource diversity”, the recognition rate of the training model with invisible data is very low.They said: “If we can accumulate more data sets in the future, the accuracy of the model can be improved and the model can be compared with other models.However, since the user can set the pill type and medication time through the application, the pill box system can be easily used at home
0 Comments for “3D printed smart pill box with neural network image recognition”