0

I was thinking about different smart contract uses cases.

Idea

Imagine a service that classifies images. It takes an image of an animal (e.g. a cat) as input and determines the type of the animal.

enter image description here

This kind of classification problem is solved using machine learning. The image recognition service uses training data to create a machine learning model. This model is open to the public via a prediction api. Users pay a fee to query this api. The machine learning model is not immutable. As new images are provided the model is retrained to improve future predictions.

Business transaction

To get a prediction following steps are required:

  • input image
  • check account balance, when enough money is available, proceed, else abort
  • wait for image recognition service to deliver output
  • receive output

Smart contract

So my question is, can this idea/ business transaction be implemented as a smart contract? Does it make sense?

Since a smart contract is immutable, for each (retrained) machine learning model, a new smart contract must be created. And one must keep track of old smart contracts, because they will deliver worse predictions. Or is there an option to destroy "old" smart contracts?

Having a highly mutable service, would it not be better to use a service like oraclize.it to implement API calls to the external service?

2

I think you can still use a smart contract for the payments. This part would be immutable and you can track your payments and such. I think an offchain solution for sending and receiving the images/answer would make more sense. Since the machine learning isnt happening in the contract, you should never have to redeploy it.

  • Thanks Karan, can you elaborate how a smart contract just for payments would look like? What would be the outcome of the contract? – Lost in OWL Nov 30 '17 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.