Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
CodeDelphiIDERAD Studio

Cartoonify Photos With This Easy But Powerful Neural Network

smartmockupskorfoay5

Based on this wiki : a convolutional neural network (CNN, or ConvNet) is a class of deep neural network, most commonly applied to analyze visual imagery. They are also known as shift invariant or space invariant artificial neural networks (SIANN).

Convolutional Neural Network? That sounds complicated! Is it?

Good news,  DeepAI.org has provided an API to access, so we can quickly build applications using it. Follow along as we show you how..

How do I set up an app with DeepAI API?

We can emulate what curl does for access to DeepAI API, because it looks quite straight-forward.

here what that looks like in Delphi code:

Using the API’s JSON output

The above code is only accessing JSON result from Toonify API, which JSON result similar to the following:

Converting the API output into something useful

So, to download the image and then attach it to the component Timage as a result of the process, here is the code:

Full Delphi source code to cartoonify and image using the DeepAI API

The full Tonify method is this:

What does the application look like?

screen-shot-2021-05-16-at-23-57-16

Check out the full source code here (GitHub link) https://github.com/herux/DelphiDeepAI-Toonify.git


Now you know how to use a Neural Network to cartoonify images in your Windows and mobile apps using Delphi! How would you use it?


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

Senior Software Engineer | Delphi/FreePascal Enthusiast | Linux/ Unix Enthusiast
Related posts
DelphiIDERAD Studio

Everything You Need To Know About An IDE For Coding

DatabaseDelphiTech Partner

This Is How To Use ADO And FireDAC With Databases

C++

How To Develop Windows Software

C++DelphiRAD Studio

5 Examples Of The Best Low Code Platforms

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES