Connect with us


How to run distributed training using Horovod and MXNet on AWS DL Containers and AWS  Deep Learning AMIs

Distributed training of large deep learning models has become an indispensable way of model training for computer vision (CV) and natural language processing (NLP) applications. Open source frameworks such as Horovod provide distributed training support to Apache MXNet, PyTorch, and TensorFlow. Converting your non-distributed Apache MXNet training script to use distributed training with Horovod only […]



Distributed training of large deep learning models has become an indispensable way of model training for computer vision (CV) and natural language processing (NLP) applications. Open source frameworks such as Horovod provide distributed training support to Apache MXNet, PyTorch, and TensorFlow. Converting your non-distributed Apache MXNet training script to use distributed training with Horovod only requires 4-5 lines of additional code. Horovod is an open-source distributed deep learning framework created by Uber. It leverages efficient inter-GPU and inter-node communication methods such as NVIDIA Collective Communications Library (NCCL) and Message Passing Interface (MPI) to distribute and aggregate model parameters between workers. The primary use case of Horovod is to make distributed deep learning fast and easy: to take a single-GPU training script and scale it successfully to train across many GPUs in parallel. For those unfamiliar with using Horovod and Apache MXNet for distributed training, we recommend first reading our previous blog post on the subject before diving into this example.

MXNet is integrated with Horovod through the common distributed training APIs defined in Horovod. You can convert the non-distributed training script to a Horovod world by following the higher level code skeleton.  This is a streamlined user experience where the user only has to add few lines of code to make it Horovod compatible. However, other pain points may still make distributed training not flow as smoothly as expected. For example, you may need to install additional software and libraries and resolve your incompatibilities to make distributed training works. Horovod requires a certain version of Open MPI, and if you want to leverage high-performance training on NVIDIA GPUs, you need to install a NCCL library. Another pain point you may encounter is when trying to scale up the number of training nodes in the cluster. You need to make sure all the software and libraries in the new nodes are properly installed and configured.

AWS Deep Learning Containers (AWS DL Containers) has greatly simplified the process of launching new training instances in a cluster, and the latest release includes all the required libraries to run distributed training using MXNet with Horovod. The AWS Deep Learning AMIs (DLAMI) comes with popular open-source deep learning frameworks and pre-configured CUDA, cuDNN, Open MPI, and NCCL libraries.

In this post, we demonstrate how to run distributed training using Horovod and MXNet via AWS DL Containers and the DLAMIs.

Getting started with AWS DL Containers

AWS DL Containers are a set of Docker images pre-installed with deep learning frameworks to make it easy to deploy custom machine learning (ML) environments quickly. The AWS DL Containers provide optimized environments with different deep learning frameworks (MXNet, TensorFlow, PyTorch), Nvidia CUDA (for GPU instances), and Intel MKL (for CPU instances) libraries, and are available in Amazon Elastic Container Registry (Amazon ECR). You can launch AWS DL Containers on Amazon Elastic Kubernetes Service (Amazon EKS), self-managed Kubernetes on Amazon Elastic Compute Cloud (Amazon EC2), and Amazon Elastic Container Service (Amazon ECS). For more information about launching AWS DL Containers, follow this link.

Training an MXNet model with Deep Learning Containers on Amazon EC2

The MXNet Deep Learning Container comes with pre-installed libraries such as MXNet, Horovod, NCCL, MPI, CUDA, and cuDNN. The following diagram illustrates this architecture.

For instructions on setting up AWS DL Containers on an EC2 instance, see: Train a Deep Learning model with AWS Deep Learning Containers on Amazon EC2. For a hands-on tutorial running a Horovod training script, complete steps 1-5 of the preceding post. To use an MXNet framework, complete the following for step 6:


  1. Download the Docker image from Amazon ECR repository.
docker run -it

  1. In the terminal of the container, run the following command to train the MNIST example.
git clone --recursive
mpirun -np 1 -H localhost:1 --allow-run-as-root python horovod/examples/


  1. Download the Docker image from Amazon ECR repository.
nvidia-docker run -it

  1. In the terminal of the container, run the following command to train the MNIST example.
git clone --recursive
mpirun -np 4 -H localhost:4 --allow-run-as-root python horovod/examples/

If the final output looks like the following code, you successfully ran the training script:

[1,0]<stderr>:INFO:root:Epoch[4] Train: accuracy=0.987580 Validation: accuracy=0.988582
[1,0]<stderr>:INFO:root:Training finished with Validation Accuracy of 0.988582

For instructions on ending the EC2 instances, execute the step 7 of the preceding post. One can follow the same steps as described above for their own training script.

Training a MXNet model with Deep Learning Containers on Amazon EKS

Amazon EKS is a managed service that makes it easy for you to run Kubernetes on AWS without needing to install, operate, and maintain your own Kubernetes control plane or nodes. Kubernetes is an open-source system for automating the deployment, scaling, and management of containerized applications. In this post, we show you how to set up a deep learning environment using Amazon EKS and AWS DL Containers. With Amazon EKS, you can scale a production-ready environment for multiple-node training and inference with Kubernetes containers.

The following diagram illustrates this architecture:

For instructions on setting up a deep learning environment with Amazon EKS and AWS DL Containers, see Amazon EKS Setup. To set up an Amazon EKS cluster, use the open-source tool called eksctl. It is recommended to use an EC2 instance with the latest DLAMI. You can spin up a GPU cluster or CPU cluster based on your use case. For this post, follow the Amazon EKS Setup instructions until the Manage Your Cluster section.

When your Amazon EKS cluster is up and running, you can run the Horovod MXNet training on the cluster. For instructions, see MXNet with Horovod distributed GPU training, which uses a Docker image that already contains a Horovod training script and a three-node cluster with node-type=p3.8xlarge. This tutorial runs the Horovod example script for MXNet on an MNIST model. The Horovod examples directory also contains an Imagenet script, which you can run on the same Amazon EKS cluster.

Getting started with the AWS DLAMI

The AWS DLAMI are machine learning images loaded with deep learning frameworks and their dependent libraries such as NVIDIA CUDA, NVIDIA cuDNN, NCCL, Intel MKL-DNN, and many others. DLAMI is a one-stop shop for deep learning in the cloud. You can launch EC2 instances with Ubuntu or Amazon Linux. DLAMI comes with pre-installed deep learning frameworks such as Apache MXNet, TensorFlow, Keras, and PyTorch. You can train custom models, experiment with new deep learning algorithms, and learn new deep learning skills and techniques. The AMIs also offer GPU and CPU acceleration through pre-configured drivers, Anaconda virtual environments, and come with popular Python packages.

The DLAMI for Ubuntu and Amazon Linux now comes with pre-installed Horovod support with a MXNet backend. You can scale your ML model from a single GPU to multiple GPUs or a multi-node cluster using an EC2 GPU instance. You can also achieve greater scaling efficiency and higher multi-GPU training performance by using Horovod with MXNet as compared to native MXNet KVStore.

All versions of the DLAMI beginning with Ubuntu 18.04 v27.0, Amazon Linux v27.0, and Amazon Linux 2 v27.0 support Horovod with MXNet. You can use any AWS CPU or GPU machine to spin up the instance using deep learning images. It is recommended to use CPU instances of type C5, C5n, or C4 (optimized for high-performance, compute-intensive workloads) and GPU instances of type P2 and P3 (the latest generation of general-purpose GPU instances).

You can run Horovod training on a single-node or multi-node cluster. A single-node cluster consists of a single machine. A multi-node cluster consists of more than one homogeneous machine. In this post, we walk you through running Horovod multi-node cluster training using MXNet.

Creating a multi-node cluster using the DLAMI

You can spin up the EC2 instances with AWS CloudFormation templates, the AWS Command Line Interface (AWS CLI), or on the Amazon EC2 console. For this post, we use the Amazon EC2 console. We launch an identical number of EC2 instances with the same DLAMI. We spin up the instances in the same Region, placement group, and security zone because those factors play an important role in achieving high performance.

  1. On the Amazon EC2 console, search for Deep Learning AMI.
  2. Choose Select for any Deep Learning AMI (Ubuntu).

  1. You now have to choose the instance type.

AWS supports various categories of instances. Based on your use case such as training time and cost, you can select General Purpose instances such as M5, Compute optimized instances such as C5, or GPU based instances such as family of P2 or P3. You can create a cluster of as many instances as possible based on your requirement. For this post, we select four p3.8xlarge instances with a total of 16 GPUs.

  1. Choose Next: Configure Instance Details.

Next, we need to configure the instances.

  1. For Number of instances, enter 4.
  2. Enter your specific network, subnet, and placement group.

If you don’t have a placement group, you can create one.

  1. Choose Next: Add Storage.

You can change this number based on your dataset size. For the demo purpose, we used the default value.

  1. Choose Next: Add Tags.
  2. For Key, enter Name.
  3. For Value, enter Horovod_MXNet.

  1. Choose Next: Configure Security Group.
  2. Create your own security group or use the existing one.

  1. Choose Review and Launch.
  2. Review your instance launch details and choose Launch.

After you choose Launch, you’re asked to select an existing key pair or create a new one.

  1. For Key pair name, enter a key pair.

If you don’t have a key pair, choose Download Key Pair.

  1. Choose Launch Instances.

If you see a green banner message, you launched the instance successfully.

  1. Choose View Instances.

  1. Search for horovod_MXNet to see the four instances you created.

We need to do one more step in our cluster setup. All the instances should be able to communicate with each other, so we have to add our security group ID to all the instances’ inbound rules.

  1. Select one instance from the four which you created.
  2. On the Description tab, choose Security groups (for this post, launch-wizard-144).

  1. On the Inbound tab, copy the security group ID (sg-00e9376c8f3cab57f).
  2. Choose Edit inbound rules.
  3. Choose Add rule.
  4. Select All traffic and SSH.
  5. Choose Save rules.

You can now see your inbound rules listed.

  1. Repeat the process to add a security group in the inbound rules for all the instances so they can communicate with each other.

You are now done with setting up your cluster.

Horovod with MXNet training on a multi-node cluster

For Horovod with MXNet training on a multi-node cluster, complete the following steps:

  1. Copy your PEM key from your local machine to one of the EC2 instances (primary node):
// For Ubuntu user
scp -i <your_pem_key_path> ubuntu@<IPv4_Public_IP>:/home/ubuntu/

// For Amazon Linux user
scp -I <your_pem_key_path> ec2-user@<IPv4_Public_IP>:/home/ec2-user/

  1. SSH into your primary node:
// For Ubuntu user
$ ssh -i <your_pem_key> ubuntu@<IPv4_Public_IP>

// For Amazon Linux user
$ ssh -i <your_pem_key> ec2-user@<IPv4_Public_IP>

  1. Enable the passwordless SSHing between EC2 instances, without providing the PEM file. Enter the following command into your primary node:
eval `ssh-agent`
ssh-add <your_pem_key>

  1. When you SSH or connect for the first time from one EC2 instance to another, you see the following message:
$ ssh <another_ec2_ipv4_address>
The authenticity of host 'xxx.xx.xx.xx' can't be established.
ECDSA key fingerprint is SHA256:xxxaaabbbbccc.
Are you sure you want to continue connecting (yes/no)? # Make sure you are able to SSH from one EC2 to another without this authenticity, otherwise horovod won't able to communicate with other machines # SOLUTION:
# Open file "/etc/ssh/ssh_config" and add this lines at the end
Host * StrictHostKeyChecking no UserKnownHostsFile=/dev/null 

  1. Activate the CONDA environment:
// If using Python 3.6
$ source activate mxnet_p36

  1. As an optional step, confirm Horovod is using MXNet on the backend by running the following command (as of this writing, the Horovod version is 0.19.5):
$ horovodrun -cb // Output
Horovod v0.19.5: Available Frameworks: [ ] TensorFlow [ ] PyTorch [X] MXNet Available Controllers: [X] MPI [X] Gloo Available Tensor Operations: [X] NCCL [ ] DDL [ ] CCL [X] MPI [X] Gloo

  1. We have provided a sample MNIST example for you to run the Horovod training.
$ horovodrun -np 4 python examples/horovod/mxnet/ // Output
[1,0]<stderr>:INFO:root:Namespace(batch_size=64, dtype='float32', epochs=5, lr=0.002, momentum=0.9, no_cuda=True)
[1,1]<stderr>:INFO:root:Namespace(batch_size=64, dtype='float32', epochs=5, lr=0.002, momentum=0.9, no_cuda=True)
[1,1]<stderr>:INFO:root:downloaded into data-1/ successfully
[1,1]<stderr>:[04:29:14] src/io/ MNISTIter: load 30000 images, shuffle=1, shape=[64,1,28,28]
// ....... <output truncated> ...........
[1,0]<stderr>:INFO:root:Epoch[4] Train: accuracy=0.987647 Validation: accuracy=0.986178
[1,0]<stderr>:INFO:root:Training finished with Validation Accuracy of 0.986178
[1,1]<stderr>:INFO:root:Training finished with Validation Accuracy of 0.986178

  1. Don’t forget to stop or terminate the instance when you no longer need it.

For more information about the horovodrun command, see here.

The preceding code just shows how to run the Horovod training script on a multi-node EC2 instance. You can find the Horovod MXNet example script on the Horovod GitHub repo. Additionally, you can bring your own training script that’s compatible with Horovod and MXNet and train the model on a single node and multi-node cluster. To learn more about the performance comparison between Horovod and Parameter Server, this blog post illustrates the difference as ResNet50 scales from 1 to 64 GPUs.

When using Horovod, keep the following in mind:

  • All your instances must be the same type
  • All your instances must have the same environment
  • The data should be stored in the same location across nodes.
  • The training script should be in the same location across nodes.


In this post, we demonstrated how to run the distributed training using Horovod and MXNet on Amazon EC2 and Amazon EKS using AWS DL Containers and AWS DLAMI. Using Horovod, your Apache MXNet models can be distributed across a cluster of instances, providing a significant increase in performance with only minimal changes to your training script.

For more information about deep learning and MXNet, see the MXNet crash course and Dive into Deep Learning book. You can also get started on the MXNet website and MXNet GitHub examples directory.

If you are new to distributed training, we highly recommend reading the paper Horovod: fast and easy distributed deep learning inTensorFlow. You can also install Horovod, build Horovod with MXNet, and follow the MNIST or ImageNet use case. You can find more Horovod MXNet examples in GluonCV example and GluonNLP example on GitHub.

About the Authors

Chaitanya Bapat is a Software Engineer with the AWS Deep Learning team. He works on Apache MXNet and integrating the framework with Sagemaker, DLC and DLAMI. In his spare time, he loves watching sports and enjoys reading books and learning Spanish.

Karan Jariwala is a Software Development Engineer on the AWS Deep Learning team. His work focuses on training deep neural networks. Outside of work, he enjoys hiking, swimming, and playing tennis.



Are Chatbots Vulnerable? Best Practices to Ensure Chatbots Security



Rebecca James
credit IT Security Guru

A simple answer is a Yes! Chatbots are vulnerable. Some specific threats and vulnerabilities risk chatbots security and prove them a wrong choice for usage. With the advancement in technology, hackers can now easily target the hidden infrastructure of a chatbot.

The chatbot’s framework has an opportunity for the attackers ready to inject the malicious codes or commands that might unlock the secured data of the customers and your business. However, the extent of the attack’s complexity and success might depend on the messaging platform’s security.

Are you thinking about how chatbots are being exposed to attacks? Well! Hackers are now highly advanced. They attack the chatbots in two ways, i.e., either by social engineering attack or by technical attacks.

  • An evil bot can impersonate a legal user by using backup data of the possibly targeted victims by social engineering attack. All such data is collected from various sources like the dark web and social media platforms. Sometimes they use both sources to gain access to some other user’s data by a bot providing such services.
  • The second attack is technical. Here also attackers can turn themself into evil bots who exchange messages with the other bots. The purpose is to look for some vulnerabilities in the target’s profile that can be later exploited. It can eventually lead to the compromise of the entire framework that protects the data and can ultimately lead to data theft.

To ensure chatbots security, the bot creators must ensure that all the security processes are in place and are responsible for restoring the architecture. The data flow via the chatbot system should also be encrypted both in transit and rest.

To further aid you in chatbot security, this article discusses five best practices to ensure chatbots security. So, let’s read on.

The following mentioned below are some of the best practices to ensure the security of chatbots.

It’s always feared that data in transit can be spoofed or tampered with the sophistication of cybercriminals’ technology and smartness. It’s essential to implement end-to-end encryption to ensure that your entire conversation remains secured. It means that by encryption, you can prevent any third person other than the sender and the receiver from peeping into your messages.

Encryption importance can’t be neglected in the cyber world, and undoubtedly the chatbot designers are adapting this method to make sure that their chatbot security is right on the point. For more robust encryption, consider using business VPNs that encrypt your internet traffic and messages. With a VPN, you can also prevent the threats and vulnerabilities associated with chatbots.

1. 8 Proven Ways to Use Chatbots for Marketing (with Real Examples)

2. How to Use Texthero to Prepare a Text-based Dataset for Your NLP Project

3. 5 Top Tips For Human-Centred Chatbot Design

4. Chatbot Conference Online

Moreover, it’s a crucial feature of other chat services like WhatsApp and other giant tech developers. They are anxious to guarantee security via encryption even when there’s strict surveillance by the government. Such encryption is to fulfill the legal principles of the GDPR that says that companies should adopt measures to encrypt the users’ data.

User identity authentication is a process that verifies if the user is having secure and valid credentials like the username and password. The login credentials are exchanged for having a secure authentication token used during the complete user session. If you haven’t, then you should try out this method for boosting user security.

Authentication timeouts are another way to ensure your chatbots security. This method is more common in banks as the token can be used for the predetermined time.

Moreover, two-factor authentication is yet another method to prove user identity. Users are asked to verify identity either by a text message or email, depending on the way they’ve chosen. It also helps in the authorization process as it permits access to the right person and ensures that information isn’t mishandled or breached.

The self-destructive message features open another way for enhancing chatbot security. This option comes in handy when the user provides their personally identifiable information. Such information can pose a serious threat to user privacy and should be destroyed or deleted within a set period. This method is handier when you’re associated with backing or any other financial chatbots.

By using secure protocols, you can also ensure chatbots security. Every security system, by default, has the HTTPS protocol installed in it. If you aren’t an IT specialist, you can also identify it when you view the search bar’s URL. As long as your data is being transferred via HTTPS protocol and encrypted connections, TLS and SSL, your data is secured from vulnerabilities and different types of cyber-attacks.

Thus, make sure to use secure protocols for enhanced security. Remember that when Chatbots are new, the coding and system used to protect it is the same as the existing HIMs. They interconnect with their security systems and have more than one encryption layer to protect their users’ security.

Do you know what the most significant security vulnerability that’s challenging to combat is? Wondering? Well! It’s none other than human error. User behavior must be resolved using commercial applications because they might continue to believe that the systems are flawed.

No doubt that an unprecedented number of users label the significance of digital security, but still, humans are the most vulnerable in the system. Chatbot security continues to be a real big problem until the problem of user errors comes to an end. And this needs education on various forms of digital technology, including chatbots.

Here the customers aren’t the ones who are to be blamed. Like customers, employees can make a mistake, and they do make most of the time. To prevent this, the chatbot developers should form a defined strategy, including the IT experts, and train them on the system’s safe use. Doing so enhances the team’s skillset and allows them to engage with the chatbot system confidently.

However, clients can’t be educated like the employees. But at least you can provide them a detailed road map of securely interacting with the system. It might involve other professionals who can successfully engage customers and educate them on the right way to interact with the chatbots.

Several emerging technologies are keen to play a vital role in protecting the chatbots against threats and vulnerabilities in the upcoming time, among all the most potent method behavior analytics and Artificial Intelligence developments.

  • User Behavioral Analytics: It’s a process that uses applications to study the patterns of user behavior. It enables them to implement complex algorithms and statistical analysis to detect any abnormal behavior that possibly represents a security threat. Analytical tools are quite common and powerful; thus, this methodology can become a fundamental component of the chatbot system.
  • Developments in AI: Artificial technology is a two-end sword that offers benefits and threats simultaneously. But, as AI is predicted to fulfill its potential, it will provide an extra security level to the systems. It is mainly because of its ability to wipe a large amount of data for abnormalities that recognizes security breaches and threats.

The Bottom Line

Security concerns have always been there with new technologies and bring new threats and vulnerabilities with them. Although chatbots are an emerging technology, the security practices that stand behind them are present for a long time and are effective. Chatbots are the innovative development of the current era, and emerging technologies like AI will transform the way businesses might interact with the customers and ensure their security.


Continue Reading


Best Technology Stacks For Mobile App Development



What’s the Best Tech Stack for Mobile App Development? Read To Know

Which is the Best Tech Stack for Mobile Application Development? Kotlin, React Native, Ionic, Xamarin, Objective-C, Swift, JAVA… Which One?

Image Source: Google

Technology Stack for smartphones is like what blood is for the human body. Without a technology stack, it is hard even to imagine smartphones. Having a smartphone in uncountable hands is rising exponentially. For tech pundits, this is one unmissable aspect of our digital experience wherein tech stack is as critical as ROI.

The riveting experience for a successful mobile app predominantly depends on technology stacks.

The unbiased selection of mobile apps development language facilitates developers to build smooth, functional, efficient apps. They help businesses tone down the costs, focus on revenue-generation opportunities. Most importantly, it provides customers with jaw-dropping amazement, giving a reason to have it installed on the indispensable gadget in present times.

In today’s time, when there are over 5 million apps globally, and by all conscience, these are whopping no.s and going to push the smartphone industry further. But now you could see mobile app development every ‘nook and corner.’ But the fact is not who provides what but understanding the behavioural pattern of users.

So the pertinent question is, which is the ideal tech stack to use for mobile app development?

In native mobile app development, all toolkits, mobile apps development language, and the SDK are supported and provided by operating system vendors. Native app development thus allows developers to build apps compatible with specific OS environments; it is suitable for device-specific hardware and software. Hence it renders optimized performance using the latest technology. However, since Android & iOS imparts — — a unique platform for development, businesses have to develop multiple mobile apps for each platform.

1. Waz

2. Pokemon Go

3. Lyft

1.Java: The popularity of JAVA still makes it one of the official programming languages for android app development until the introduction of Kotlin. Java itself is at the core of the Android OS. Many of us even see the logo of Java when the device reboots. However, contradictions with Oracle (which owns the license to Java) made Google shift to open-source Java SDK for versions starting from Android 7.0 Nougat

2.Kotlin: According to Google I/O conference in 2019- Kotlin is the officially supported language for Android app development. It is entirely based on Java but has a few additions which make it simpler and easier to work.

1. 8 Proven Ways to Use Chatbots for Marketing (with Real Examples)

2. How to Use Texthero to Prepare a Text-based Dataset for Your NLP Project

3. 5 Top Tips For Human-Centred Chatbot Design

4. Chatbot Conference Online

It’s my gut feeling like other developers to say that Kotlin is simply better. It has a leaner, more straightforward and concise code than open-cell Java, and several other advantages about handling null-pointer exceptions and more productive coding.

HERE’S A Programming Illustration Defining the CONCISENESS OF KOTLIN CODE

public class Address {

private String street;

private int streetNumber;

private String postCode;

private String city;

private Country country;

public Address(String street, int streetNumber, String postCode, String city, Country country) {

this.street = street;

this.streetNumber = streetNumber;

this.postCode = postCode; = city; = country;



public boolean equals(Object o) {

if (this == o) return true;

if (o == null || getClass() != o.getClass()) return false;

Address address = (Address) o;

if (streetNumber != address.streetNumber) return false;

if (!street.equals(address.street)) return false;

if (!postCode.equals(address.postCode)) return false;

if (!city.equals( return false;

return country ==;



public int hashCode() {

int result = street.hashCode();

result = 31 * result + streetNumber;

result = 31 * result + postCode.hashCode();

result = 31 * result + city.hashCode();

result = 31 * result + (country != null ? country.hashCode() : 0);

return result;



public String toString() {

return “Address{“ +

“street=’” + street + ‘\’’ +

“, streetNumber=” + streetNumber +

“, postCode=’” + postCode + ‘\’’ +

“, city=’” + city + ‘\’’ +

“, country=” + country +



public String getStreet() {

return street;


public void setStreet(String street) {

this.street = street;


public int getStreetNumber() {

return streetNumber;


public void setStreetNumber(int streetNumber) {

this.streetNumber = streetNumber;


public String getPostCode() {

return postCode;


public void setPostCode(String postCode) {

this.postCode = postCode;


public String getCity() {

return city;


public void setCity(String city) { = city;


public Country getCountry() {

return country;


public void setCountry(Country country) { = country;



class Address(street:String, streetNumber:Int, postCode:String, city:String, country:Country) {

var street: String

var streetNumber:Int = 0

var postCode:String

var city: String

var country:Country


this.street = street

this.streetNumber = streetNumber

this.postCode = postCode = city = country


public override fun equals(o:Any):Boolean {

if (this === o) return true

if (o == null || javaClass != o.javaClass) return false

Val address = o as Address

if (streetNumber != address.streetNumber) return false

if (street != address.street) return false

if (postCode != address.postCode) return false

if (city != return false

return country ===


public override fun hashCode():Int {

val result = street.hashCode()

result = 31 * result + streetNumber

result = 31 * result + postCode.hashCode()

result = 31 * result + city.hashCode()

result = 31 * result + (if (country != null) country.hashCode() else 0)

return result


public override fun toString():String {

return (“Address{“ +

“street=’” + street + ‘\’’.toString() +

“, streetNumber=” + streetNumber +

“, postCode=’” + postCode + ‘\’’.toString() +

“, city=’” + city + ‘\’’.toString() +

“, country=” + country +




I’d say KOTLIN IS THE BEST FIND FOR ANDROID APP DEVELOPMENT.Google has dug deeper with some plans ahead since announcing it as an official language. Moreover, it signals Google’s first steps in moving away from the Java ecosystem, which is imminent, considering its recent adventures with Flutter and the upcoming Fuchsia OS.

Objective C is the same for iOS what Java is for Android. Objective-C, a superset of the C programming language( with objective -oriented capabilities and dynamic run time) initially used to build the core of iOS operating system across the Apple devices. However, Apple soon started using swift, which diminishes the importance of Objective -C in comparison to previous compilations.

Apple introduced Swift as an alternative to Objective-C in late 2015, and it has since been continued to be the primary language for iOS app development.Swift is more functional than Objective-C, less prone to errors, dynamic libraries help reduce the size and app without ever compromising performance.

Now, you would remember the comparison we’ve done with Java and kotlin. In iOS, objective-C is much older than swift with much more complicated syntax. Giving cringeworthy feel to beginners to get started with Objective-C.

Image Source: Google


NSMutableArray * array =[[NSMutableArray alloc] init];


var array =[Int]()


In cross-platform app development, developers build a single mobile app that can be used on multiple OS platforms. It is made possible by creating an app with a shared common codebase, adapted to various platforms.

Image Source: Google

Popular Cross-platform apps:

  1. Instagram
  2. Skype
  3. LinkedIN

React Native is a mobile app development framework based on JavaScript. It is used and supported by one of the biggest social media platforms- Facebook. In cross-platform apps built using React Native, the application logic is coded in JavaScript, whereas its UI is entirely native. This blog about building a React Native app is worth reading if you want to know why its stakes are higher.

Xamarin is a Microsoft-supported cross-platform mobile app development tool that uses the C# programming language. Using Xamarin, developers can build mobile apps for multiple platforms, sharing over 90% of the same code.

TypeScript is a superset of JavaScript, and is a statically-typed programming language supported by Microsoft. TypeScript can be used along with the React Native framework to make full use of its error detection features when writing code for react components.

In Hybrid mobile app development, developers build web apps using HTML, CSS & JavaScript and then wrap the code in a native shell. It allows the app to be deployed as a regular app, with functionality at a level between a fully native app and a website rendered(web browser).

Image Source: Google
  1. Untappd
  2. Amazon App Store
  3. Evernote

Apache Cordova is an open-source hybrid mobile app development framework that uses JavaScript for logic operations and while HTML5 & CSS3 for rendering. PhoneGap is a commercialized, free, and open-source distribution of Apache Cordova owned by Adobe. The PhoneGap platform was developed to deliver non-proprietary, free, and open-source app development solutions powered by the web.

Ionic is a hybrid app development framework based on AngularJS. Similar to other hybrid platforms, it uses HTML, CSS & JavaScript to build mobile apps. Ionic is primarily focused on the front-end UI experience and integrates well with frameworks such as Angular, Vue, and ReactJS.

To summarize, there are 3 types of mobile apps- Native mobile apps, Cross-platform mobile apps, and Hybrid mobile apps; each offers unique technologies, frameworks, and tools of their own. I have enlisted here the best mobile app technology stacks you could use for mobile app development.

The technologies, tools, and frameworks mentioned here are used in some of the most successful apps. With support from an expert, a well-established mobile app development company, that may give much-needed impetus in the dynamic mobile app development world.


Continue Reading


Arcanum makes Hungarian heritage accessible with Amazon Rekognition

Arcanum specializes in digitizing Hungarian language content, including newspapers, books, maps, and art. With over 30 years of experience, Arcanum serves more than 30,000 global subscribers with access to Hungarian culture, history, and heritage. Amazon Rekognition Solutions Architects worked with Arcanum to add highly scalable image analysis to Hungaricana, a free service provided by Arcanum, […]



Arcanum specializes in digitizing Hungarian language content, including newspapers, books, maps, and art. With over 30 years of experience, Arcanum serves more than 30,000 global subscribers with access to Hungarian culture, history, and heritage.

Amazon Rekognition Solutions Architects worked with Arcanum to add highly scalable image analysis to Hungaricana, a free service provided by Arcanum, which enables you to search and explore Hungarian cultural heritage, including 600,000 faces over 500,000 images. For example, you can find historical works by author Mór Jókai or photos on topics like weddings. The Arcanum team chose Amazon Rekognition to free valuable staff from time and cost-intensive manual labeling, and improved label accuracy to make 200,000 previously unsearchable images (approximately 40% of image inventory), available to users.

Amazon Rekognition makes it easy to add image and video analysis to your applications using highly scalable machine learning (ML) technology that requires no previous ML expertise to use. Amazon Rekognition also provides highly accurate facial recognition and facial search capabilities to detect, analyze, and compare faces.

Arcanum uses this facial recognition feature in their image database services to help you find particular people in Arcanum’s articles. This post discusses their challenges and why they chose Amazon Rekognition as their solution.

Automated image labeling challenges

Arcanum dedicated a team of three people to start tagging and labeling content for Hungaricana. The team quickly learned that they would need to invest more than 3 months of time-consuming and repetitive human labor to provide accurate search capabilities to their customers. Considering the size of the team and scope of the existing project, Arcanum needed a better solution that would automate image and object labelling at scale.

Automated image labeling solutions

To speed up and automate image labeling, Arcanum turned to Amazon Rekognition to enable users to search photos by keywords (for example, type of historic event, place name, or a person relevant to Hungarian history).

For the Hungaricana project, preprocessing all the images was challenging. Arcanum ran a TensorFlow face search across all 28 million pages on a machine with 8 GPUs in their own offices to extract only faces from images.

The following screenshot shows what an extract looks like (image provided by Arcanum Database Ltd).

The images containing only faces are sent to Amazon Rekognition, invoking the IndexFaces operation to add a face to the collection. For each face that is detected in the specified face collection, Amazon Rekognition extracts facial features into a feature vector and stores it in an Amazon Aurora database. Amazon Rekognition uses feature vectors when it performs face match and search operations using the SearchFaces and SearchFacesByImage operations.

The image preprocessing helped create a very efficient and cost-effective way to index faces. The following diagram summarizes the preprocessing workflow.

As for the web application, the workflow starts with a Hungaricana user making a face search request. The following diagram illustrates the application workflow.

The workflow includes the following steps:

  1. The user requests a facial match by uploading the image. The web request is automatically distributed by the Elastic Load Balancer to the webserver fleet.
  2. Amazon Elastic Compute Cloud (Amazon EC2) powers application servers that handle the user request.
  3. The uploaded image is stored in Amazon Simple Storage Service (Amazon S3).
  4. Amazon Rekognition indexes the face and runs SearchFaces to look for a face similar to the new face ID.
  5. The output of the search face by image operation is stored in Amazon ElastiCache, a fully managed in-memory data store.
  6. The metadata of the indexed faces are stored in an Aurora relational database built for the cloud.
  7. The resulting face thumbnails are served to the customer via the fast content-delivery network (CDN) service Amazon CloudFront.

Experimenting and live testing Hungaricana

During our test of Hungaricana, the application performed extremely well. The searches not only correctly identified people, but also provided links to all publications and sources in Arcanum’s privately owned database where found faces are present. For example, the following screenshot shows the result of the famous composer and pianist Franz Liszt.

The application provided 42 pages of 6×4 results. The results are capped to 1,000. The 100% scores are the confidence scores returned by Amazon Rekognition and are rounded up to whole numbers.

The application of Hungaricana has always promptly, and with a high degree of certainty, presented results and links to all corresponding publications.

Business results

By introducing Amazon Rekognition into their workflow, Arcanum enabled a better customer experience, including building family trees, searching for historical figures, and researching historical places and events.

The concept of face searching using artificial intelligence certainly isn’t new. But Hungaricana uses it in a very creative, unique way.

Amazon Rekognition allowed Arcanum to realize three distinct advantages:

  • Time savings – The time to market speed increased dramatically. Now, instead of spending several months of intense manual labor to label all the images, the company can do this job in a few days. Before, basic labeling on 150,000 images took months for three people to complete.
  • Cost savings – Arcanum saved around $15,000 on the Hungaricana project. Before using Amazon Rekognition, there was no automation, so a human workforce had to scan all the images. Now, employees can shift their focus to other high-value tasks.
  • Improved accuracy – Users now have a much better experience regarding hit rates. Since Arcanum started using Amazon Rekognition, the number of hits has doubled. Before, out of 500,000 images, about 200,000 weren’t searchable. But with Amazon Rekognition, search is now possible for all 500,000 images.

 “Amazon Rekognition made Hungarian culture, history, and heritage more accessible to the world,” says Előd Biszak, Arcanum CEO. “It has made research a lot easier for customers building family trees, searching for historical figures, and researching historical places and events. We cannot wait to see what the future of artificial intelligence has to offer to enrich our content further.”


In this post, you learned how to add highly scalable face and image analysis to an enterprise-level image gallery to improve label accuracy, reduce costs, and save time.

You can test Amazon Rekognition features such as facial analysis, face comparison, or celebrity recognition on images specific to your use case on the Amazon Rekognition console.

For video presentations and tutorials, see Getting Started with Amazon Rekognition. For more information about Amazon Rekognition, see Amazon Rekognition Documentation.

About the Authors

Siniša Mikašinović is a Senior Solutions Architect at AWS Luxembourg, covering Central and Eastern Europe—a region full of opportunities, talented and innovative developers, ISVs, and startups. He helps customers adopt AWS services as well as acquire new skills, learn best practices, and succeed globally with the power of AWS. His areas of expertise are Game Tech and Microsoft on AWS. Siniša is a PowerShell enthusiast, a gamer, and a father of a small and very loud boy. He flies under the flags of Croatia and Serbia.

Cameron Peron is Senior Marketing Manager for AWS Amazon Rekognition and the AWS AI/ML community. He evangelizes how AI/ML innovation solves complex challenges facing community, enterprise, and startups alike. Out of the office, he enjoys staying active with kettlebell-sport, spending time with his family and friends, and is an avid fan of Euro-league basketball.


Continue Reading
AI3 hours ago

Are Chatbots Vulnerable? Best Practices to Ensure Chatbots Security

AI3 hours ago

Best Technology Stacks For Mobile App Development

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition

AI23 hours ago

Arcanum makes Hungarian heritage accessible with Amazon Rekognition