Let's go back in time and think about how sophisticated we are now. In the earlier 1990s, we didn't have enough computing power or as many powerful computers as we do now to do complex operations and not train a machine learning model for sure. You won't be able to sit along and code all day staring at a CTR monitor in front of you. Humans have always been these evolving creatures; How to use things, discover things, think differently of the world. With that said, computer science and technology have been in the boom since we started experimenting and pushing them to their limits. Now here we are in 2022, battling out which is the best editor (
Vim Vs Emacs) and with cloud empowering people to make digital transformations on all or most physical assets.
👨💻For people who say, enough of talk - YouTube Demo Link
🕵️♂️For people who say, just show what you've built - GitHub Repo Link
Here is a small example of how technology can be utilized in the right way to build something for humanity to sustain better in this changing world. When you're talking about cancer, regardless of type, detecting it as early as possible increases the chance of survival.
Skin cancer is the most common form of cancer, globally accounting for at least 40% of cancer cases and the most common type is nonmelanoma skin cancer, which occurs in at least 2–3 million people per year.
Seeing this and I thought why don't we solve something this bad, leveraging Power Platform for its simplicity and rapid development ability.
This solution is completely built by leveraging Low code/No code platforms such as Power Apps and Power Automate, as well as Azure serverless offerings. The flow goes something like this, employees/nurses in the hospital can add new patients into the system and upload their skin sample image which then goes through the ML model for initial screening, and the result is sent to a dermatologist for closure. Once this is done then an appointment is scheduled automatically if cancer is detected by the model and the dermatologist confirms the same. The desired treatment plan is created in the backend and updated in the SharePoint List which can be viewed by the patients through Power Apps. The dermatologist can view the slots booked and the patient details.
I've used Python in Azure Function, feel free to replicate the same in your favorite language. 🐱👤
- Power Apps as UI
- Power Automate for flow triggers
- SharePoint as database
- Azure Functions for exposing model endpoint and uploading an image to blob storage
- Logic Apps for receiving the response from Adaptive Card
- Azure Blob Storage for storing predicted images
- Azure DevOps keeping track of False-positive images
- Adaptive Cards (Outlook Actionable Message)
Peek look at how the Azure Resource Group.
Enough of talk! Let’s see things in action, shall we?🤹♀️
As you see below we select the patient name from the dropdown, choose the image, and hit upload, a cool loader shows up to let you know that the image is sent to Azure Function, this triggers
DetectSampleImage Power Automate flow. This returns the detected cancer type, uploads the image to blob storage for future reference, and updates the patient list item in SharePoint.
The biggest part in doing this simple thing is how to send the image bytes to the flow and reconstruct the same in Azure Function
Once this is done, you can choose the dermatologist from the dropdown and send this report via Adaptive Card Actionable item, this triggers the
SendEmailToDoctor power automate flow and the step level is set to 1 now.
This gets the dermatologist's prediction type, appointment date, and time and updates it to the patient details list, and confirms the slot of the appointment. In the end, this also sends a card response to the dermatologist notifying that the details are saved successfully.
- Model trained with images from the dataset here
- It gives out the following labels,
- Dermatofibrosarcoma protuberans
- squamous cell carcinoma
- Accuracy of 95% trained over 35 epochs
- You can find the model in the GitHub repo.
- Auto-select the dermatologist based on the availability and critical care needed for the patient
- Send a Calendar invite instead of the plain text email when the dermatologist confirm the appointment
- Setup a retraining mechanism that trains the model with the latest images per month in Azure Machine Learning (designer)
- Live Chat assistance through Virtual Agents
- Set up a treatment plan for each patient who is diagnosed
Feel free to reach out if you need any further clarification on the implementation. I would be more than happy to answer those. 🤝
Looking forward to hearing from you and improvements via Comments or PRs are most welcomed.🙏
Congratulations!! 🎉you have completed reading this huge blog.🤩
Thanks a lot for reading out till the end.👓
Let’s connect if you want to collaborate on further work or a quick catch up.🤝
Using technology to make real impact on our day-to-day lives with Microsoft Azure cloud services and tools.
Enterprise grade skin cancer detection and treatment solution
This solution is completely built by leveraging Low code/No code platforms such as Power Apps and Power Automate, as well as Azure serverless offerings The flow goes something like this, employee/nurse in the hospital can add new patient into the system and upload their skin sample image into the system which then goes through the ML model for initial screening and the result is send to a dermatologist for closure. Once this is done then an appointment is scheduled automatically if cancer is detected and the treatment plan is created in the backend and updated in the SharePoint List. The dermatologist can view the slots booked and the patient details.