VOOZH about

URL: https://www.analyticsvidhya.com/blog/2019/06/ai-comic-zain-issue-1-automating-computer-vision/

⇱ The AI Comic: Z.A.I.N - Issue #1: No Attendance, No Problem


India's Most Futuristic AI Conference Is Back – Bigger, Sharper, Bolder

  • d
  • :
  • h
  • :
  • m
  • :
  • s

Reading list

The AI Comic: Z.A.I.N – Issue #1: Automating Attendance using Computer Vision

preritrathi Last Updated : 24 Jun, 2019
4 min read

Sound does not travel in a vaccum.

The above concept might just be a simple fact for you – but I had a tough time learning this in the manner it was taught in one of my classes. I actually learnt it when this was implemented in a comic and one of the Super Heroes I followed used this to solve an otherwise difficult challenge.

I have been in awe with the power of comics to help us understand concepts in a simple and visual manner. The ebb and flow of stories, the build up and the climax usually hold up people like me for hours.

Now, think of a technical article. Do you remember a blog you read about a specific technique from a few months back? I’d guess you don’t. I certainly don’t!

That’s why we at Analytics Vidhya came up with the idea of the world’s first Artificial Intelligence (AI) comic! We believe comics are an awesome way of learning a concept through interactive storytelling. Simply put, it’s a brilliant way to learn complex data science topics.

Welcome to Issue #1 of Analytics Vidhya’s A.I. Comic!

👁 AI Comic

With this AI comic series, I aim to bring out my imagination for the benefit of millions of kids and friends. I aim to help them understand how AI & ML will change our world. And I hope, a few years down the line, they remember Z.A.I.N as the super hero who helped them understand the super power of machines!

We will combine advanced blog content and code on machine learning and AI with the storytelling style of a comic. Are you ready to dive into the world of AI comics? Let’s begin – and welcome to issue #1!

 Issue #2 of AI-COMIC: Z.A.I.N (Keep Calm and Optimise) is out now!check it out here

About Z.A.I.N.

Z.A.I.N. is the first issue of Analytics Vidhya’s Artificial Intelligence (AI) comic series that successfully merges technical and complex Artificial Intelligence implementations with the fun of reading comic books.

The comic book series combines both of these elements:

  1. An intriguing storyline along with a daily life implementation of AI
  2. Technical AI content, including fully functional code implementation in Python and a whole lot more!

Here’s Kunal Jain, Analytics Vidhya’s Founder and CEO, along with me, to give you a glimpse into this AI comic series:

Indulge in the World of Comics through Z.A.I.N

Here is all you need to know about the chief character of this comic book series:

👁 AI Comic

👁 AI Comic

Note: Use the right and left arrow keys to navigate through the below slider.

You can download the full comic here!

Python Code and Explanation

Had fun reading the A.I. comic? Now, let’s understand the code behind the attendance system. That’s right – we are going to implement the Python code we just saw!

We’ll be using the below libraries in this section:

  • OpenCV: For detecting faces and eyes by the inbuilt eye and face cascade classifiers.
  • Matplotlib: For reading and plotting both the images.
  • NumPy:  “Complementary” – an all-time classic library!

Next, we read the .jpg file and plot it with the matplotlib library. In this case, we are using a photo of a single face (Tony Stark) which is saved in here as ‘ TS3.jpg ‘:

After reading and plotting the image, we come to the main code block:

Here, we use Face and Eye cascade Classifiers to get the coordinates of top and bottom corners of both the face and eyes respectively. Those coordinates/points are stored in variables:

  • x‘, ‘y‘, ‘w‘, ‘h‘ (for face cascade)
  • ew‘, ‘ey‘, ‘ex‘, ‘eh‘ (for eye cascade)

Then, we use these coordinates to plot rectangles around the face and eyes. The basic thought process is to count the number of rectangles around the faces, thus counting the number of faces:

Let’s implement the same code-block on a picture of the classroom. Our aim, remember, was to count the number of faces in the class. That’s exactly how Z.A.I.N saved the day! And now it’s our turn.

The image of the classroom is saved as ‘face-detection.jpg’. You can download the image from here and follow along with the code we’ll soon see. You can even play around with an image of your choice. I strongly believe the best way to learn a concept is by experimenting!

Let’s get back to our classroom. The below code makes rectangles around most of the faces in the classroom:

Awesome! We have successfully built the automated attendance system using computer vision! The adventures of Z.A.I.N have only just begun.

End Notes

This first issue of AV’s AI comic, Z.A.I.N, was the story about how computer vision can change our day-to-day lives for the better. And guess what? There are many such adventures that await him and all of us.

Issue #2 is coming soon. Grab your popcorn and get ready to partake in another awesome AI adventure because the next issue is going to take our learning to a whole new level.

Thank you for reading. Feel free to leave your thoughts, your experience, and precious feedback in the comments section below!

Login to continue reading and enjoy expert-curated content.

Free Courses

Generative AI - A Way of Life

Explore Generative AI for beginners: create text and images, use top AI tools, learn practical skills, and ethics.

Getting Started with Large Language Models

Master Large Language Models (LLMs) with this course, offering clear guidance in NLP and model training made simple.

Building LLM Applications using Prompt Engineering

This free course guides you on building LLM apps, mastering prompt engineering, and developing chatbots with enterprise data.

Improving Real World RAG Systems: Key Challenges & Practical Solutions

Explore practical solutions, advanced retrieval strategies, and agentic RAG systems to improve context, relevance, and accuracy in AI-driven applications.

Microsoft Excel: Formulas & Functions

Master MS Excel for data analysis with key formulas, functions, and LookUp tools in this comprehensive course.

Responses From Readers

Teja

I cannot see any eyes detected in the classroom's picture?

123 1
Prerit Rathi

Hi, Teja! Firstly, thanks a lot for reading the article. I hope you enjoyed it. So, basically my objective...or, Put it this way, Z.A.I.N's objective was to detect only the faces. The eyes don't matter much in this scenario. Moreover, eye cascade classifier would only classify and detect the eyes when both of them are clearly visible and are "DETECTABLE" as you saw with the photo tony stark but in the classroom photo, the eyes weren't pretty much visible. But still, if you want to classify the eyes too, you could try taking some other image where the eyes are "VISIBLE"

123 456
harish nagpal

Good one Prerit. I learnt a new thing today. Keep it up. Waiting for your next one.

123 1
Prerit Rathi

thanks a lot, harish. I really appreciate the feedback and I could tell you that the successive "ISSUES" would be even more interesting and fun!

123 456
Harish Nagpal

Good one. I learnt a new thing today. Keep it up.

Flagship Programs

GenAI Pinnacle Program| GenAI Pinnacle Plus Program| AI/ML BlackBelt Program| Agentic AI Pioneer Program

Free Courses

Generative AI| DeepSeek| OpenAI Agent SDK| LLM Applications using Prompt Engineering| DeepSeek from Scratch| Stability.AI| SSM & MAMBA| RAG Systems using LlamaIndex| Building LLMs for Code| Python| Microsoft Excel| Machine Learning| Deep Learning| Mastering Multimodal RAG| Introduction to Transformer Model| Bagging & Boosting| Loan Prediction| Time Series Forecasting| Tableau| Business Analytics| Vibe Coding in Windsurf| Model Deployment using FastAPI| Building Data Analyst AI Agent| Getting started with OpenAI o3-mini| Introduction to Transformers and Attention Mechanisms

Popular Categories

AI Agents| Generative AI| Prompt Engineering| Generative AI Application| News| Technical Guides| AI Tools| Interview Preparation| Research Papers| Success Stories| Quiz| Use Cases| Listicles

Generative AI Tools and Techniques

GANs| VAEs| Transformers| StyleGAN| Pix2Pix| Autoencoders| GPT| BERT| Word2Vec| LSTM| Attention Mechanisms| Diffusion Models| LLMs| SLMs| Encoder Decoder Models| Prompt Engineering| LangChain| LlamaIndex| RAG| Fine-tuning| LangChain AI Agent| Multimodal Models| RNNs| DCGAN| ProGAN| Text-to-Image Models| DDPM| Document Question Answering| Imagen| T5 (Text-to-Text Transfer Transformer)| Seq2seq Models| WaveNet| Attention Is All You Need (Transformer Architecture) | WindSurf| Cursor

Popular GenAI Models

Llama 4| Llama 3.1| GPT 4.5| GPT 4.1| GPT 4o| o3-mini| Sora| DeepSeek R1| DeepSeek V3| Janus Pro| Veo 2| Gemini 2.5 Pro| Gemini 2.0| Gemma 3| Claude Sonnet 3.7| Claude 3.5 Sonnet| Phi 4| Phi 3.5| Mistral Small 3.1| Mistral NeMo| Mistral-7b| Bedrock| Vertex AI| Qwen QwQ 32B| Qwen 2| Qwen 2.5 VL| Qwen Chat| Grok 3

AI Development Frameworks

n8n| LangChain| Agent SDK| A2A by Google| SmolAgents| LangGraph| CrewAI| Agno| LangFlow| AutoGen| LlamaIndex| Swarm| AutoGPT

Data Science Tools and Techniques

Python| R| SQL| Jupyter Notebooks| TensorFlow| Scikit-learn| PyTorch| Tableau| Apache Spark| Matplotlib| Seaborn| Pandas| Hadoop| Docker| Git| Keras| Apache Kafka| AWS| NLP| Random Forest| Computer Vision| Data Visualization| Data Exploration| Big Data| Common Machine Learning Algorithms| Machine Learning| Google Data Science Agent
👁 Av Logo White

Continue your learning for FREE

Forgot your password?
👁 Av Logo White

Enter OTP sent to

Edit

Wrong OTP.

Enter the OTP

Resend OTP

Resend OTP in 45s

👁 Popup Banner
👁 AI Popup Banner