Viva Questions.
- Computer Vision (CV)
- What is Computer Vision?
- Answer: It is a domain of AI that enables machines to see, interpret, and analyze visual information from the world (images and videos).
- What is a Pixel?
- Answer: A pixel (Picture Element) is the smallest unit of a digital image.
- What is the range of intensity in an 8-bit grayscale image?
- Answer: 0 to 255, where 0 is pure black and 255 is pure white.
- Define Image Classification vs. Object Detection.
- Answer: Classification identifies what is in an image (e.g., “a cat”). Object Detection identifies what and where (drawing a bounding box around the cat).
- What is the role of OpenCV in Python?
- Answer: OpenCV (Open Computer Vision) is a library used for image processing tasks like resizing, blurring, and edge detection.
- Explain Convolution in simple terms.
- Answer: It is a mathematical operation where a small matrix (kernel) is passed over an image to extract features like edges or textures.
- What is an RGB image?
- Answer: It is a color image composed of three channels: Red, Green, and Blue.
- What does a “Kernel” or “Filter” do?
- Answer: It is a small matrix used to apply effects like sharpening, blurring, or detecting edges in an image.
- Give two real-life applications of CV.
- Answer: Face recognition in smartphones and autonomous (self-driving) cars.
- What is Image Segmentation?
- Answer: It is the process of partitioning a digital image into multiple segments (sets of pixels) to simplify its analysis.
- Natural Language Processing (NLP)
- What is the primary goal of NLP?
- Answer: To bridge the communication gap between humans and computers by allowing machines to understand and generate human language.
- What is the difference between a Script-bot and a Smart-bot?
- Answer: Script-bots follow a fixed script/rules; Smart-bots use AI and Machine Learning to learn from interactions and improve.
- Explain “Tokenization”.
- Answer: It is the process of breaking down a large corpus (text) into smaller units like words or sentences called “tokens.”
- What are Stopwords?
- Answer: Common words like “and,” “the,” “is” that add little meaning to a sentence and are usually removed during preprocessing.
- Define Stemming vs. Lemmatization.
- Answer: Stemming chops off the ends of words (e.g., “studies” becomes “studi”). Lemmatization finds the meaningful root (e.g., “studies” becomes “study”).
- What does TF-IDF stand for?
- Answer: Term Frequency-Inverse Document Frequency. It helps determine how important a word is to a document in a collection.
- What is a “Corpus” in NLP?
- Answer: A large collection of text data used for training AI models.
- Explain the “Bag of Words” (BoW) model.
- Answer: It is a method to represent text data numerically by counting the frequency of words, ignoring their order.
- What is Sentiment Analysis?
- Answer: Identifying the emotional tone of a text (Positive, Negative, or Neutral).
- Mention one challenge in NLP.
- Answer: Lexical Ambiguity (when a word has multiple meanings, like “bank” – river bank vs. financial bank).
- Data Science & Statistics
- What is the difference between a Population and a Sample?
- Answer: Population is the entire group; a Sample is a smaller subset of that group used for analysis.
- Define Mean, Median, and Mode.
- Answer: Mean is the average; Median is the middle value; Mode is the most frequent value.
- When is the Median better than the Mean?
- Answer: When the data has “outliers” (extreme values) that would distort the average.
- What is Standard Deviation?
- Answer: A measure of how spread out the numbers are from the average (mean).
- Explain the difference between Structured and Unstructured data.
- Answer: Structured data is organized (like Excel tables); Unstructured data is unorganized (like emails, videos, or social media posts).
- What is a CSV file?
- Answer: Comma Separated Values; a simple text file format used to store tabular data.
- What is the purpose of Data Visualization?
- Answer: To represent data graphically (using charts/graphs) to identify patterns and trends easily.
- Explain the term “Outlier”.
- Answer: A data point that is significantly different from the rest of the observations.
- What is a Histogram used for?
- Answer: To show the frequency distribution of continuous data.
- What are the stages of the AI Project Cycle?
- Answer: Problem Scoping, Data Acquisition, Data Exploration, Modelling, and Evaluation.
- Advanced Python
- Why is Python the preferred language for AI?
- Answer: Because of its simple syntax and extensive libraries like NumPy, Pandas, and Matplotlib.
- What is the difference between a List and a Tuple?
- Answer: Lists are mutable (can be changed); Tuples are immutable (cannot be changed).
- What is the use of the import statement?
- Answer: It is used to bring external libraries or modules into your current script.
- What does the range() function do?
- Answer: It generates a sequence of numbers (e.g., range(5) gives 0, 1, 2, 3, 4).
- What is a Virtual Environment in Python?
- Answer: A tool to create isolated spaces for different projects so their dependencies (libraries) don’t clash.
- Explain Python Indentation.
- Answer: Python uses whitespace (indentation) to define blocks of code (like inside an if statement or loop), unlike other languages that use curly braces.
- What is the purpose of the pandas library?
- Answer: It is used for data manipulation and analysis, specifically for handling tables (DataFrames).
- What is a Lambda function?
- Answer: A small, anonymous “one-liner” function defined without a name using the lambda keyword.
- What does plt.show() do in Matplotlib?
- Answer: It displays the graph or plot that you have created.
- What is a “Module” in Python?
- Answer: A file containing Python code (functions, classes, variables) that can be reused in other programs.
- Imagine I have a digital photograph of a sunset. Can you explain what a ‘pixel’ is and how the computer understands the color of that pixel?”
The Answer
“A pixel (short for ‘picture element’) is the smallest unit of a digital image. Think of it like a tiny square in a large mosaic.
To understand color, the computer uses the RGB model:
- Each pixel is made of three color channels: Red, Green, and Blue.
- Each channel has a value ranging from 0 to 255 (representing intensity).
- By mixing these three colors at different intensities, the computer can create millions of colors. For example, $(255, 0, 0)$ is bright Red, while $(255, 255, 255)$ is pure White.”
- Before an AI can understand a long sentence, we often perform Tokenization. Can you tell me what Tokenization is and why it is important for the machine?”
The Answer
“Tokenization is the process of breaking down a large piece of text (like a paragraph or a sentence) into smaller, manageable units called tokens. These tokens are usually individual words or punctuation marks.
Why is it important? A machine cannot ‘read’ a whole paragraph at once. It needs to see the individual components to analyze them. For example, the sentence ‘AI is fun!’ gets tokenized into: [‘AI’, ‘is’, ‘fun’, ‘!’]. This allows the computer to count words, find patterns, and understand the structure of the language.”
- In statistics, we often talk about the ‘Mean’ and the ‘Median’. If I have a dataset of salaries where one person earns way more than everyone else (an outlier), which one should I use to represent the ‘average’ person, and why?”
The Answer
“You should use the Median because it is not affected by outliers.
- The Mean (average) is calculated by adding all values and dividing by the total count. If one person earns a huge amount, it pulls the Mean way up, making it look like everyone earns more than they actually do.
- The Median is simply the middle value when you line the numbers up from smallest to largest. Even if the last number is massive, the middle number stays the same, giving a more ‘honest’ picture of the typical salary.”
- You’ve probably used Lists in your projects. But Python also has something called a Tuple. What is the main difference between a List and a Tuple, and how do you recognize them in code?”
In Python, the biggest difference is mutability (whether you can change it or not).
The Answer
“The main difference is that Lists are mutable (can be changed) and Tuples are immutable (cannot be changed once created).
- Brackets: You recognize a List by square brackets [ ] and a Tuple by parentheses ( ).
- Usage: You use a List when you want to add, remove, or change items later. You use a Tuple for data that should stay constant, like the coordinates of a location or the RGB values of a color.”
- You might have heard of the term ‘Grayscale’. If a color image has three channels (Red, Green, Blue), how many channels does a Grayscale image have, and what do the values 0 and 255 represent in it?”
The Answer
A grayscale image has only 1 channel. Unlike color images that use three channels (Red, Green, and Blue), grayscale images only store the intensity of light.
- Value 0: Represents Pure Black (total absence of light).
- Value 255: Represents Pure White (full intensity of light).
- Values in between: All the different shades of gray (e.g., 128 is a medium gray).
- Sometimes we want to clean up our data by removing words like ‘the’, ‘is’, ‘at’, and ‘and’. What are these words called in NLP, and why do we remove them?”
The Answer
“These are known as Stopwords. They are the most common words in a language (like ‘the’, ‘is’, ‘in’, ‘an’).
Why do we remove them?
- They don’t carry ‘weight’: If an AI is trying to figure out if a movie review is positive or negative, words like ‘the’ don’t help. The words ‘excellent’ or ‘boring’ are much more important.
- Reducing Noise: Removing them makes the dataset smaller and helps the AI focus only on the keywords that actually define the meaning of the text.”
- In the AI Project Cycle, there is a stage called ‘Data Acquisition’. Can you tell me what that means and name two sources from where we can collect data for an AI project?”
In the AI Project Cycle, this is where the foundation of your model is built.
The Answer
“Data Acquisition is the process of collecting relevant data that will be used to train our AI model. Without data, the AI cannot learn patterns or make predictions.
Two sources for collecting data:
- Web Scraping/Online Databases: Extracting data from websites or using public datasets like Kaggle.
- Surveys/Sensors: Collecting original data through forms (surveys) or physical devices like cameras and temperature sensors.”
- Imagine you are working with a very large table of data (like an Excel sheet) in Python. Which library would you use to handle this data, and what is the name of the 2D table structure used in that library?”
For handling tabular data, you would use the Pandas library.
The Answer
“The library is called Pandas. It is the most powerful tool in Python for data manipulation and analysis.
The 2D table structure used in Pandas is called a DataFrame. Think of a DataFrame like a digital spreadsheet with rows and columns. It allows you to filter, sort, and analyze large amounts of data very quickly using code.”
- People often confuse ‘Image Classification’ with ‘Object Detection’. If I show an AI a picture with three dogs in it, what would be the difference in the output between these two techniques?”
This is a classic question to see if you understand how AI “looks” at a scene.
The Answer
“The difference lies in the detail of the output:
- Image Classification: The AI would simply give a label to the whole image, like ‘Dogs’. It tells you what is in the image but doesn’t tell you where they are or how many there are.
- Object Detection: The AI would draw Bounding Boxes around each individual dog. It would identify three separate objects, label each as ‘Dog’, and show their exact location in the picture.”
- we use a technique called ‘Bag of Words’. Does this technique care about the order of the words in a sentence? And what is the main thing it counts?”
Exactly! Just like a real bag, the order doesn’t matter.
The Answer
“No, the Bag of Words (BoW) model does not care about the order of the words.
- What it counts: It simply counts the frequency (how many times) each word appears in a document.
- The Concept: It treats a sentence like a ‘bag’ full of words. It throws away the grammar and the sequence, focusing only on which words are present. For example, ‘The cat sat’ and ‘Sat the cat’ would look exactly the same to a BoW model because they contain the same words.”