All Projects → mccorby → Photolabeller

mccorby / Photolabeller

Licence: mit
Federated Learning: Client application doing classification of images and local training. Works better with the Parameter Server at https://github.com/mccorby/PhotoLabellerServer

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Photolabeller

Fly
Deploy app servers close to your users. Package your app as a Docker image, and launch it in 17 cities with one simple CLI.
Stars: ✭ 862 (+624.37%)
Mutual labels:  edge-computing
Awesome System For Machine Learning
A curated list of research in machine learning system. I also summarize some papers if I think they are really interesting.
Stars: ✭ 1,185 (+895.8%)
Mutual labels:  edge-computing
Jutsu.ai
Clojure wrapper for deeplearning4j
Stars: ✭ 93 (-21.85%)
Mutual labels:  deeplearning4j
Pujangga
Pujangga - Indonesian Natural Language Processing Tool with REST API, an Interface for InaNLP and Deeplearning4j's Word2Vec
Stars: ✭ 47 (-60.5%)
Mutual labels:  deeplearning4j
Awesome Mobile Machine Learning
A curated list of awesome mobile machine learning resources for iOS, Android, and edge devices.
Stars: ✭ 1,136 (+854.62%)
Mutual labels:  edge-computing
Yolo Custom Object Detector
Making custom object detector using Yolo (Java and Python)
Stars: ✭ 84 (-29.41%)
Mutual labels:  deeplearning4j
Sparkfun edge
SparkFun's Edge Development Board is based around the newest edge technology and is perfect for getting your feet wet with voice and even gesture recognition without relying on 3rd party cloud services.
Stars: ✭ 23 (-80.67%)
Mutual labels:  edge-computing
Berrynet
Deep learning gateway on Raspberry Pi and other edge devices
Stars: ✭ 1,529 (+1184.87%)
Mutual labels:  edge-computing
Deeplearning4j
All DeepLearning4j projects go here.
Stars: ✭ 68 (-42.86%)
Mutual labels:  deeplearning4j
Neardb
Simple document db made for infinitely scalable globally distributed reads.
Stars: ✭ 92 (-22.69%)
Mutual labels:  edge-computing
Edgeml
This repository provides code for machine learning algorithms for edge devices developed at Microsoft Research India.
Stars: ✭ 1,093 (+818.49%)
Mutual labels:  edge-computing
Fogflow
FogFlow is a standard-based IoT fog computing framework that supports serverless computing and edge computing with advanced programming models
Stars: ✭ 64 (-46.22%)
Mutual labels:  edge-computing
Utensor
TinyML AI inference library
Stars: ✭ 1,295 (+988.24%)
Mutual labels:  edge-computing
Utensor cgen
C++ code generator for uTensor https://utensor-cgen.readthedocs.io/en/latest/
Stars: ✭ 42 (-64.71%)
Mutual labels:  edge-computing
Cloudflare Typescript Workers
Types and mocks for building a tested Typescript Cloudflare Worker, generates three NPM packages
Stars: ✭ 94 (-21.01%)
Mutual labels:  edge-computing
Digitrecognizer
Java Convolutional Neural Network example for Hand Writing Digit Recognition
Stars: ✭ 23 (-80.67%)
Mutual labels:  deeplearning4j
Coreml Training
Source code for my blog post series "On-device training with Core ML"
Stars: ✭ 77 (-35.29%)
Mutual labels:  edge-computing
Baetyl
Extend cloud computing, data and service seamlessly to edge devices.
Stars: ✭ 1,655 (+1290.76%)
Mutual labels:  edge-computing
Mainflux
Industrial IoT Messaging and Device Management Platform
Stars: ✭ 1,341 (+1026.89%)
Mutual labels:  edge-computing
Libgdl
一个移动端跨平台的gpu+cpu并行计算的cnn框架(A mobile-side cross-platform gpu+cpu parallel computing CNN framework)
Stars: ✭ 91 (-23.53%)
Mutual labels:  edge-computing

Check this blog entry for more information

Federated Learning

This project is an implementation of a Federated Learning system consisting on a Parameter Server and an Android application that can be used as a client

Both components are implemented in Kotlin using DL4J as the Machine Learning framework

Enjoy!

The problem

Training a machine learning model requires data. The more we have, the better (well... not always, but let's allow some simplifications). However, data is not cheap and more importantly, it can contain sensitive and personal information.

Recent developments in privacy in the form of new laws as GDPR and the increase of awareness of users and citizens in the value of their data is generating a need for techniques to enforce more privacy

Though techniques as anonymisation can greatly help with the privacy issue the fact that all the data is being sent to a central location to train the machine learning models is always a motive to be worried about

Federated Learning as a solution to privacy

Federated Learning turns the update of Machine Learning models upside-down by allowing the devices on the edge to participate in the training.

Instead of sending the data in the client to a centralised location, Federated Learning sends the model to the devices participating in the federation. The model is then re-trained (using Transfer Learning) with the local data

And the data, your data, never leaves the device, let that be your phone, your laptop or your IoT gadget

High-level Architecture

image alt text

Very briefly the process of training a model goes as follows:

  • The server opens a new round of training
  • The clients that are going to participate in the training round download the latest version of the model from the server
  • Using their local data, each client updates the model
  • Those updates are sent to the server
  • The server gathers all updates and applies Federated Averaging to improve the shared model
  • The shared model is now ready for all clients to use

Use Case. Classifying and training images

To demonstrate how Federated Learning works, I have implemented a system based on Cifar-10, a well-known image classification dataset

Android client

| image alt text | image alt text |

Client Architecture

The architecture allows to remove the UI bit in Android and apply the rest with little effort to another type of client that supports Kotlin

Parameter Server

Server Architecture

Federated Averaging

The averaging is done by the server once it has received a minimum number of updates. It applies Federated Averaging as defined in 1

See FederatedAveragingStrategy.kt

    override fun processUpdates(): ByteArrayOutputStream {
        val totalSamples = repository.getTotalSamples()
        val model = ModelSerializer.restoreMultiLayerNetwork(repository.retrieveModel())
        val shape = model.getLayer(layerIndex).params().shape()

        val sumUpdates = repository.listClientUpdates().fold(
                Nd4j.zeros(shape[0], shape[1]),
                { sumUpdates, next -> processSingleUpdate(next, totalSamples, sumUpdates) }
        )

        model.getLayer(layerIndex).setParams(sumUpdates)
        val outputStream = ByteArrayOutputStream()
        ModelSerializer.writeModel(model, outputStream, true)
        repository.storeModel(outputStream.toByteArray())
        return outputStream
    }

References

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].