All Projects → capeprivacy → encrypted-skin-cancer-detection

capeprivacy / encrypted-skin-cancer-detection

Licence: Apache-2.0 license
Detecting skin cancer in encrypted images with TensorFlow

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to encrypted-skin-cancer-detection

fastai-visual-guide
Notebooks for Fastai Viusal Guide
Stars: ✭ 25 (-7.41%)
Mutual labels:  image-classification, fastai
minionn
Privacy -preserving Neural Networks
Stars: ✭ 58 (+114.81%)
Mutual labels:  multi-party-computation, privacy-preserving
tensorflow-classification
A unified program to check predictions of different convolutional neural networks for image classification.
Stars: ✭ 68 (+151.85%)
Mutual labels:  image-classification
memento
Organize your meme image cluster in a better format using OCR from the meme to sort them using tesseract along with editing memes by segmenting them using OpenCV within a directory
Stars: ✭ 70 (+159.26%)
Mutual labels:  image-classification
awesome-computer-vision-models
A list of popular deep learning models related to classification, segmentation and detection problems
Stars: ✭ 419 (+1451.85%)
Mutual labels:  image-classification
Maix-LogoClassifier
A simple logo classifier developed using Maixduino framework and PlatfomIO, to run on K210 MCU on Sipeed's Maix dev board.
Stars: ✭ 25 (-7.41%)
Mutual labels:  image-classification
rps-cv
A Rock-Paper-Scissors game using computer vision and machine learning on Raspberry Pi
Stars: ✭ 102 (+277.78%)
Mutual labels:  image-classification
fastblog
My fastai blog
Stars: ✭ 20 (-25.93%)
Mutual labels:  fastai
imgpalr
R package for generating color palettes from arbitrary images.
Stars: ✭ 44 (+62.96%)
Mutual labels:  image-classification
Parametric-Contrastive-Learning
Parametric Contrastive Learning (ICCV2021)
Stars: ✭ 155 (+474.07%)
Mutual labels:  image-classification
fastdownload
Easily download, verify, and extract archives
Stars: ✭ 35 (+29.63%)
Mutual labels:  fastai
Kaggle-Cdiscount-Image-Classification-Challenge
No description or website provided.
Stars: ✭ 15 (-44.44%)
Mutual labels:  image-classification
CV
本仓库将使用Pytorch框架实现经典的图像分类网络、目标检测网络、图像分割网络,图像生成网络等,并会持续更新!!!
Stars: ✭ 72 (+166.67%)
Mutual labels:  image-classification
Custom-CNN-based-Image-Classification-in-PyTorch
No description or website provided.
Stars: ✭ 41 (+51.85%)
Mutual labels:  image-classification
catacomb
The simplest machine learning library for launching UIs, running evaluations, and comparing model performance.
Stars: ✭ 13 (-51.85%)
Mutual labels:  image-classification
Food-Categories-Classification
This repository contains the dataset and the source code for the classification of food categories from meal images.
Stars: ✭ 48 (+77.78%)
Mutual labels:  image-classification
Tensorflow-Dog-Breed-Classifier
Tensorflow Image classifier that can predict the breed of a dog from it photo. Trained on image dataset of 5 different breed of dogs (rottweiler, bulldog, pug, german shepherds, labrador). Interestingly the classifier was able to predict the breed of the dogs even from images of their toys.
Stars: ✭ 14 (-48.15%)
Mutual labels:  image-classification
UnityProminentColor
Tool to gather main colors of an image using Unity.
Stars: ✭ 40 (+48.15%)
Mutual labels:  image-classification
vframe
VFRAME: Visual Forensics and Metadata Extraction
Stars: ✭ 41 (+51.85%)
Mutual labels:  image-classification
Billion-scale-semi-supervised-learning
Implementing Billion-scale semi-supervised learning for image classification using Pytorch
Stars: ✭ 81 (+200%)
Mutual labels:  image-classification

Encrypted Skin Cancer Detection

Project Overview

The purpose of this project is to demonstrate how simple it is to provide encrypted skin cancer detection with TF Encrypted. We released this code in the context of the blog post A Path to Sub-Second, Encrypted Skin Cancer Detection.

Only three steps are required to provide private predictions:

  • Train your deep learning model with the framework of your choice.
  • Export the model to a protocol buffer file (protobuf).
  • Load the protobuf in TF Encrypted to start serving private predictions.

Install

This project requires Python 3.6 and the following Python libraries installed:

You can easily install these libraries with:

pip install -r requirements.txt

We recommend installing Anaconda, a pre-packaged Python distribution that can be used to install and manage all of the necessary libraries and software for this project.

If you experience any issues installing fastai, you can consult the documentation.

Run Private Predictions

If you want, you can run a private prediction right away. We supply a protobuf containing the model weights and the neural network architecture in this GCS storage bucket. For demonstration purposes, we also provide a pre-processed skin lesion image as a pickled Numpy array: skin_cancer_image.npy.

To perform a private prediction locally, you can simply run this command in your terminal:

MODEL_URL=https://storage.googleapis.com/tfe-examples-data/skin_cancer/skin_cancer_model.pb
./private_predict --protocol_name securenn \
      --model $MODEL_URL \
      --input-file skin_cancer_image.npy \
      --batch-size 1 \
      --iterations 1

Alternatively, you can download the protobuf manually and supply it directly to the CLI:

./private_predict --protocol_name securenn \
      --model skin_cancer_model.pb \
      --input-file skin_cancer_image.npy \
      --batch-size 1 \
      --iterations 1

When running this command, a TF Encrypted graph is automatically created using the GraphDef inside the supplied protobuf. The original model weights are secret shared during this conversion process. Finally, data provided through the --input-file arg is secret shared before the model performs the secure inference.

Training

After downloading the data from here, you can train the model by running the notebook training.ipynb. The purpose of this model is to classify correctly the malignant skin lesions (Melanoma) images. For this project, we trained the model with the fastai library to quickly experiment with different architectures, data augmentation strategies, cyclical learning rates, etc. This was mainly due to the availability of the cyclical learning rate finder -- training with TensorFlow, Keras, or a library like tensor2tensor is usually preferred.

Once trained, the model gets exported to a protobuf file with the function export_to_pb from the utility file transform_to_pb.py. This function first transforms the PyTorch model into a TensorFlow graph and then exports it to protobuf.

Data

For this project, we have gathered 1,321 skin lesions images labeled as Melanona and 2,229 skin lesion images labeled as Nevi or Seborrheic Keratoses. This data were collected from the 2017 ISIC Challenge on Skin Lesion Analysis Towards Melanoma Detection and additional data where collected from ISIC archive using the instructions here. You can download the data used for this project from here.

Codella N, Gutman D, Celebi ME, Helba B, Marchetti MA, Dusza S, Kalloo A, Liopyris K, Mishra N, Kittler H, Halpern A. "Skin Lesion Analysis Toward Melanoma Detection: A Challenge at the 2017 International Symposium on Biomedical Imaging (ISBI), Hosted by the International Skin Imaging Collaboration (ISIC)". arXiv: 1710.05006 [cs.CV] Available: https://arxiv.org/abs/1710.05006

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].