Desktop version

Home arrow Computer Science

  • Increase font
  • Decrease font


<<   CONTENTS   >>

PROPOSED SOLUTION

5.5.1 METHODOLOGY

For the implementation of a pretrained model, that is, MobileNet, this chapter uses various TensorFlow libraries. This application will help the user to identify skin disease using affected skin images along with home remedies and instantly connect with teledennatology. hi addition, it provides emergency and nearby pharmacy and hospitals. It involves two patient users and doctors, hi skin disease classification, the prior data set is required to make the system leam about its features and characteristics. When the data are available, the system has to preprocess it and apply filters such as color transformation, rotation, etc. Figure 5.2 shows the complete flowchart of ApnaDermato.

The complete flowchart of ApnaDermato

FIGURE 5.2 The complete flowchart of ApnaDermato.

5.5.1.1 CREATING THE DATASET

For this application, we downloaded images for each skin disease from Google images for training purposes. We also created a separate folder for each skin disease for classification. For each disease, we have maintained a dataset of 1000 training images.

5.5.1.2 ENFORCE STANDARD RESOLUTION

For ensuring consistency in the training process, we took all images in JPEG format and converted all images in 320 x 240 resolution.

5.5.13 TRAIN THE MODEL (MOBILENET')

The model used here is MobileNet. MobileNet is a small, efficient CNN, and it performs the same calculations at each location in the image. MobileNet takes input image in 128-, 160-, 192-, or 224-pixel resolution. We supply the infected skin images as input to the MobileNet model, and we will run the training using script retrain and pass parameters such as the number of training steps, outputgraph, output_labels, and image_dir.

5.5.1.4 CREATING BOTTLENECKS

When retraining begins, bottlenecks are created similar to the screenshot given below. The penultimate layer of the inception model classifies the images supplied during training. This penultimate layer is called bottleneck. After the bottleneck training is over, the final layer generated gives the validation accuracy. In the end, we find two files, retrained graph.pb and retrained_labels.txt, in the working directory. The file “retrained_graph.pb” is our final retrained model for our app that classifies diseases based on the image provided, and retrained_labels.txt is a text file that contains the labels, that is, the disease names from the dataset. For testing any input image, we use script label_image and pass the location of that image.

5.51.5 CONVERSION OF THE MODEL TO TFLITE FORMAT

TensorFlow Lite is TensorFlow lightweight solution for mobile and embedded devices. TensorFlow Lite comprises a runtime on which you can run preexisting models and a suite of tools that you can use to prepare your models for use on mobile and embedded devices. Using the TFLite flat buffer script, we convert our model to the TFLite file for use on mobile.

In Figure 5.3, skin image will be provided to the MobileNet model as input, and output will be in the form of disease label with the corresponding probability.

5.51.6 TESTING THE MODEL

For testing the model, we created a separate test set that contained images for each skin disease. The model produced good accuracy, over 80% on every image. Figure 5.3 contains a sample test case wherein the input image was ringworm. This particular test case produced 98.8% accuracy. We integrated this model into an android app since it is convenient for various users. The model ranks the result set as per the accuracy calculated. It returns a list of top three predictions, as shown in the figure. In this mobile application, we capture the best result, query the name in the database, and display the appropriate information.

Diagram of MobileNet model

FIGURE 5.3 Diagram of MobileNet model.

5.5.2 APNADERMATO

ApnaDermato bridges the communication gap between the doctor and the patient. Earlier, patients used to wait in long queues or cany their child for skin treatment; now, using ApnaDermato, patients can get the diagnosis for skin diseases from specialized doctors across the world.

For using this android mobile application, first, the patient has to agree to the terms and conditions; as it is a health-related application, the patient has to accept the ethics and responsibilities of the app. Once the user accepted all the terms and conditions, the user has three options: patient login, doctor login, and patient register. In Figure 5.4, disclaimer is shown because this is health-centric application.

In Figure 5.5, registration form is shown for patient to fill. The patient has to register itself before using the application. Once a user registered with our application, the patient can log in into our app. After login, the patient will see a dashboard where the patient can either fill a diagnosis form or can find a nearby pharmacy store and hospital based on its current location and many other features. Apart from nearby pharmacies, patients can also search for nearby hospitals and bum hospitals.

Figure 5.6 shows login screen for once registered users and Figure 5.7 displays dashboard for patient. A doctor can only log in to the application. Doctors are registered manually, and after verification of the required documents, the doctor is allowed to log in into the system. After login, the doctor can view patient queries on which he can provide the diagnosis and send it back to the patient. Figure 5.8 shows dashboard for doctors.

If a parent or a guardian wants to get a diagnosis of his or her child’s skin diseases, he or she has to fill the diagnosis form on the dashboard. The diagnosis form consists of some standard information such as an image of the

Terms and conditions

FIGURE 5.4 Terms and conditions.

Home screen

FIGURE 5.6 Home screen.

affected area, the name of a child, age, and a description of the disease. After filling the form, parent has to answer specific intelligent questions such as: Is the affected area bleeding? Is child crying? etc. Figure 5.9 reveals patient submitting query to doctor and Figure 5.10 illustrates intelligent questioning with patient to know more about then condition.

Doctor login

FIGURE 5.8 Doctor login.

Based on the diagnosis form and intelligent questions, this application can classify the condition of the child as urgent or not urgent. Every time, we cannot disturb a doctor for some common problems that can be cured by some home remedies. Our application ApnaDermato can identify five skin diseases trained on 1000 images and can give an accuracy of more than 85%.

The primaiy purpose of intelligent questions is to improve the accuracy of the system and adequately classify the condition. If the system identifies the disease as not urgent, then specific home remedies will be suggested to the patient, and after some time, a notification will be forwarded to the patient asking the condition of the child. If a parent says a child is fine, then the case will be stored in a database for future reference, but if the child’s condition is serious, then the case is directly forwarded to the doctor. Figure 5.11 shows some remedies and FAQs and Figure 5.12 reveals reminder notification for patients.

Patient query

FIGURE 5.9 Patient query.

Remedies for nonurgent conditions

FIGURE 5.11 Remedies for nonurgent conditions.

If the system identifies the condition as urgent, then it will directly be forwarded to the doctor for diagnosis, and the patient will not be suggested home remedies. Figure 5.13 shows identifying emergency cases.

Urgent case condition

FIGURE 5.13 Urgent case condition.

A doctor can see all the patient queries and can accept or reject the case based on his or her availability. If the doctor accepted the requested, then all the information of the patient will be shown along with the predicted skin disease. If the doctor thinks the disease is the same as predicted, he or she can provide the diagnosis on it, else if the doctor thinks the predicted disease is not the same, then he or she can uncheck the check and provide diagnosis along with disease name. Figure 5.14 shows doctor receiving patient request and Figure 5.15 reveals doctor writing prescription to patients.

A patient can see the diagnosis in the previous record section on the dashboard where all the previous requested cases are stored. The patient can also search the nearby pharmacy and hospital based on the current location. A patient can also contact the development team for any technical help by clicking on the help tab on the dashboard. Figure 5.16 shows patients’ records stored in application, Figure 5.17 showing nearby pharmacies to get medications, and Figure 5.18 reveals providing medications for common problems. Figure 5.19 displays giving patients an option to chat with doctor if they accepted their request.

Accept or reject

FIGURE 5.14 Accept or reject.

Nearby pharmacies

FIGURE 5.16 Nearby pharmacies.

Common problems

FIGURE 5.18 Common problems.

A patient can also ask diagnosis from liis teledennatology by scanning the quick response (QR) code of the doctor. A doctor will have a QR code generated based on the information provided; this information will be encrypted using some encryption methods. A patient has to personally visit the doctor once for scanning the QR code. Once the code is scanned, the chat interface is set up between the doctor and the patient. Doctors’ QR code is shown in Figure 5.20, which can be scanned and added by the patients and after scanned by the patient, doctor information is shown in patients’ app in Figure 5.21. Figure 5.22 shows patient chat with doctor and Figure 5.23 showing that doctor can consult to patients on chat.

Doctors QR code

FIGURE 5.20 Doctors QR code.

A doctor can view the statistics for a particular disease at a particular location. These statistics will be helpftil to know if there has been an epidemic in an area. The doctor also has all the history of the patient treated. Figure 5.24 reveals statistics can be given to doctor based on symptoms.

A patient can also see the home remedies and the do’s and don’ts for some common skin disease problems.

5.5.3 RESULT ANALYSIS

There are five types of diseases considered, ringworm, chickenpox, fifth disease, warts, and contact dermatitis, as shown in Table 5.2.

Scaimed QR code

FIGURE 5.21 Scaimed QR code.

Chat between patient and doctor

FIGURE 5.23 Chat between patient and doctor.

TABLE 5.2 Training Accuracy

Disease Name

Number of Training Images

Accuracy (%)

1.

Ringworm

1000

95

2.

Cliickenpox

1000

93

3.

Fifth disease

1000

90

4.

Warts

1000

92

5.

Contact dermatitis

1000

89

Table 5.2 shows the accuracy achieved for each disease while training the dataset created from Google images. 3x3 depthwise separable convolutions are used by MobileNet, which uses around eight to nine times less computation than standard convolutions at only a minimal reduction inaccuracy. Considering the efficiency achieved in computation, this tradeoff with reduced accuracy is acceptable. The average accuracy for each disease is more than 85%.

Table 5.3 shows the accuracy achieved for each disease while testing the dataset created from Google images. The test set consisted of 150 images for each disease. The average accuracy obtained for each disease was more than 80%. Considering the computational limits of mobile devices, the performance of the MobileNet model is quite impressive. For mobile devices, a computationally inexpensive model is preferable. MobileNet satisfies these criteria in exchange for a small reduction of accuracy, which is tolerable.

TABLE 5.3 Testing Accuracy

Disease Name

Number of Testing Images

Number of Images Correctly Identified

Accuracy

Ringworm

150

129

86

Cliickenpox

150

128

85

Fifth disease

150

126

84

Warts

150

123

82

Contact dermatitis

150

120

80

PROS AND CONS OF THE PROPOSED METHOD

Pros of the proposed method

• Increased access, particularly in areas where geographic barriers prevent or limit a person’s ability to get dermatologic treatment.

  • • Increased convenience, particularly for patients who can avoid unnecessary visits.
  • • Reduced wait times for patients who need urgent consultation and for patients who need in-person visits.
  • • Improved scheduling, particularly in areas where dermatology sendees are in high demand.
  • • Lowered healthcare costs.
  • • Statistical data help to get the idea of epidemic conditions in an area.
  • • Recoimnendation of home remedies to common skin problems.
  • • Notification to doctors about emergency cases.
  • • The system can classify a case as urgent or not urgent based on a machine learning model and intelligent questions.
  • • Locating nearby pharmacies and hospitals.
  • • A personal chat with doctors.
  • • Statistics for research purpose.

Cons of the proposed method

  • • The application cannot detect the false information entered by the user.
  • • Image quality will be affected if the patient clicks the image with less megapixel.
  • • Blur image can affect the detection of disease, and the model may predict the wrong disease.
  • • The model cannot give 100% accuracy for any trained disease.
  • • The model cannot detect the disease in low-light conditions.

CONCLUSION

In this chapter, we have implemented an automatic classification method to find skin diseases and provided diagnosis. This chapter is capable of classifying five skin diseases hi infants as well as adults. They are chickenpox, contact dermatitis, fifth disease, ringworm, and wart. This application gave us 85% accuracy having 5000 training images and 750 testing images. The app was able to classify 616 images out of 750 images correctly. The proposed system overcomes the drawback of existing applications, as mentioned in Chapter 4, with the remarkable idea of handling the less sensitive cases automatically without even disturbing the doctor for those. No other system can handle this scenario of less sensitive disease beforehand, but our system can. When the patient having a typical skin rash, then instead of approaching directly to the doctor, our system fust provides the home remedies; then, on no sign of cure, the case will be sent to the doctor. This application can give statistics to the users about the overall diseases in a region for better visualization of the world’s population. This application can help solve many daily issues of the common man. Even though the proposed method is not 100% effective and ready for public use, it is an effort to explore automation in healthcare for the benefit of society without any additional charges.

FUTURE SCOPE

This chapter has a vast scope in the future because it revolutionizes the medical field and the procedure doctors are following today to cure existing diseases.

  • • More than five skin diseases can be considered for training to detect more diseases.
  • • With due course of time, the system can be configured to leant from the diagnosis of the doctor and can have a detection rate of 100% and can be made available to the public. Such a system saves all the efforts humans can make to cure skin diseases in infants and eventually reduces the death rate of newly bom children.
  • • Once this system reaches its saturation point, this application can extend to accommodate to detect other diseases that can be cured by visual diagnosis.
  • • This application can become the source of ranking for doctors who treated the patients in their past, which can help in achieving a higher level of expertise in their respective fields.

KEYWORDS

  • skin disease detection
  • image processing
  • transfer learning
  • MobileNet
  • ReLU

REFERENCES

  • 1. J. P. Siiino and Y. Qiang. “A survey on transfer learning.” IEEE Trans. Know!. Data Eng., vol. 22, no. 10, pp. 1345-1359, 2010.
  • 2. T. Guo, J. Doug, H. Li, and Y. Gao, “Simple convolutional neural network on image classification,” in Proc. IEEE 2nd Int. Conf. Big Data Anal., 2017, pp. 721-724
  • 3. Y. Nisha, K. N. Yirender, and S. Utpal, “Skin diseases detection models using image processing: A survey,” Int. J. Comput. Appl.,xo. 137, pp. 34-39, 2016.
  • 4. S. К.Л may, S. K. Sujay, and S. Yarun, “Dermatological disease detection using image processing and machine learning,” in Proc. 3rd Int. Conf. Artif Intel!. Pattern Recognit., 2016, pp. 88-93.
  • 5. S. A. Pravinand A. S. Shirsat, “An image analysis system to detect skin diseases,” IOSR J. VLSI Signal Process., vol. 6, no. 5. pp. 17-25, 2016.
  • 6. G. Kevin and S. Noha, “Softmax-marghi CRFs: Training log-linear models with cost functions,” in Proc. North Am. Chapter Assoc. Comput. Linguistics Human Lang. Techno!. Conf, 2010, pp. 733-736.
  • 7. A. G. Howard, M. Zhu, B. Chen, D. Kaleuicheuko, W. Wang. T. Weyand, M. Andreetto. and H. Adam. “MobileNets: Efficient convolutional neural networks for mobile vision applications,” Comput. Vis. Pattern Recognit., pp. 1-9,2017.
  • 8. К. P. Sourav, S. S. Mansher, G. Yaagyanika, S. Bhairvi, and P. Muthu. “Automated skin disease identification using deep learning algorithm,” Biomed. Pharmacol. J., vol. 11. no. 3,pp. 1429-1436, 2018.
  • 9. Y. Rabat, R. Ashiqur, and A. Nova, “Dermatological disease detection using image processing and artificial neural network,” in Proc. Int. Conf. Elect. Comput. Eng., 2014, pp. 687-690.
  • 10. S. Christian. V. Vincent. I. Sergey, and S. Jonathon, “Rethinking the inception architecnire for computer vision,” Comput. Vis. Pattern Recognit., vol. 3, pp. 1-10, 2015.
 
<<   CONTENTS   >>

Related topics