It has been over 6 months now since tools and libraries have been made ready for developers to use. iExec organized a DApp Challenge in January and we are today beginning to see the first releases of applications built on top of iExec.

This new series, labelled “DApp of the Week” will regularly feature these to showcase what can be done using iExec, and how you can already launch decentralized applications running on a decentralized cloud.

The DApp of the Week is Decentralized AI, and has been developed by Benoît Courty, Matthew McAteer, Alexandre Moreau and Jeddi Mees.

Blueprint for decentralized artificial intelligence

Deep learning is a subfield of machine learning, which is a technology inspired by the human brain and its functions.

Deep learning is already commonly used in several different industries. Social media, for instance, uses it to curate content feeds in user timelines, and Photoshop uses it to separate subjects from a background.

However, such a prowesses are difficult to realize for open-source software because of 3 main pain points:

Having access to a huge pool of valuable and accurate data

Having easy access to large-scale computing

Democratizing the use of AI

The team behind Decentralized AI aims at addressing these points, by allowing anyone to compute deep learning algorithms with as less knowledge as possible.

Decentralized AI is a semantic segmentation task which is executed in a decentralized fashion. The semantic segmentation is done by the Mask RCNN project trained on the COCO Dataset.

From an input image to a rendered semantic segmentation output image

The Decentralized AI stack is made of two parts:

A training part, with Open Mined

A prediction part, with iExec

Predictions with iExec

The prediction part uses a Docker image that is executed on the iExec network each time a user requests an AI task.

The iExec infrastructure

iExec offers a cloud computing marketplace to allow the trading of cloud power as a commodity. It means that one can easily buy computing ressources.

A provider of computing power is called a “worker”.

Workers are grouped together in “worker pools”. Worker pools can be a cloud providers who want to increase their ROI by leveraging their unsued computing power, or individuals who want to get a little bit of money from their home machines.

The iExec marketplace is the place where workers sell their power to buyers, exactly as in an open marketplace or cryptocurrency exchange. It’s a pay-per-task (PPT) system, similarly to a cloud API provider.

The DApp Store is where you can find packaged applications to run on the iExec network.

The data marketplace is where you could sell or buy data (available in a future release).

The Architecture

Decentralized AI is built above iExec to offer an easy way to request a machine learning task.

The Back-End

A Docker image was built with Keras, Tensorflow, Python 3 and matplotlib in headless mode to render the result in a file.

The RCNN (regional convolutional neural network) weight file trained on the COCO dataset was added to the image.

A Python script based on the demo Jupyter Notebook from Matterport for Mask RCNN was made.

The Docker image was deployed to DockerHub.

An iExec dapp (decentralized application) was built using the just released iExec SDK V2, and deployed to the iExec marketplace.

The result is an application ready to be called by any Ethereum smart contract. The contract calls the dapp with the image URL to process.

The computation of the image is done off-chain and acts as an Oracle.

The Front-End

On the left, users can upload their image. On the right, they have access to the list of available workers and the associated costs of computations.

Decentralized AI developers used NodeJS, Vue.JS, Vuetify, ETHjs, the iExec front SDK, and IPFS-api.

They have also used IPFS to allow user to upload an image to IPFS. However, this process is not mandatory, as a a user could also copy-paste an URL from Internet.

Then the user pays the processing in RLC and the Gas in ETH with Metamask.

The user also could check all of his transactions and download results.

More instruction on how to run the application can be found on its developers’ Github.

You can use Decentralized AI and perform semantic segmentations on your own images here: http://nrxubuntu.eastus2.cloudapp.azure.com/

Sources

[1] Benoît Courty, Matthew McAteer, Alexandre Moreau and Jeddi Mees (2018) Decentralized AI Whitepaper for Siraj’s Decentralized Apps

[2] Matterport (2018) Mask R-CNN for Object Detection and Segmentation

Follow Us

Website • Blog • Slack • Telegram • Reddit • Twitter • Facebook • LinkedIn• Youtube • Github • Kakao • Instagram • Steemit • Katacoda • Docs