Completed by Pranav Β· BBACA Graduate Β· Modern College of Arts, Science & Commerce, Pune
"The best way to learn AI is to build something with it."
- About This Internship
- Task Summary
- Task 1 β Language Translation Tool
- Task 2 β FAQ Chatbot Β· ARIA
- Task 4 β Object Detection & Tracking Β· TITAN
- Setup & Installation
- How to Run
- Project Structure
- What I Learned
- Acknowledgements
- Contact
This repository contains my completed AI projects for the CodeAlpha Artificial Intelligence Internship β a program focused on building real-world AI applications using Python.
Each project covers a distinct domain of AI:
| Domain | Project |
|---|---|
| Natural Language Processing | FAQ Chatbot β ARIA |
| Translation Systems | Language Translation Tool |
| Computer Vision & Deep Learning | Object Detection β TITAN |
| Desktop Application Development | All three projects use Tkinter |
| Task | Project | Status |
|---|---|---|
| Task 1 | Language Translation Tool | β Completed |
| Task 2 | FAQ Chatbot β ARIA | β Completed |
| Task 3 | Music Generation with AI | β Skipped |
| Task 4 | Object Detection & Tracking β TITAN | β Completed |
Certificate requirement: Minimum 2 tasks completed. β
A desktop translation application built entirely in Python β a self-contained mini Google Translate with no paid API key required.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β User enters text β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ
β
βββββββββββββΌβββββββββββββ
β Select source lang β β Auto-detect supported
β Select target lang β β 20+ languages
βββββββββββββ¬βββββββββββββ
β
βββββββββββββΌβββββββββββββ
β deep-translator β
β (Google Translate β
β engine β free) β
βββββββββββββ¬βββββββββββββ
β
βββββββββββββΌβββββββββββββ
β Translated text β
β displayed instantly β
ββββββββββββββββββββββββββ
| Feature | Description |
|---|---|
| π 20+ Languages | Hindi, French, Spanish, Japanese, Arabic, German & more |
| π Auto-detect | Detects source language automatically |
| β Swap | One-click swap between source and target |
| π Copy | Copy translated output to clipboard |
| π Clear | Clear both panels in one click |
| π Status bar | Shows translation result live |
| π Dark UI | Modern dark-themed Tkinter interface |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π Language Translation Tool CodeAlpha Task 1 β
β ββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β From [ Auto Detect βΌ ] β To [ Hindi βΌ ] β
β β
β βββββββββββββββββββββ βββββββββββββββββββββ β
β β Enter text... β β Translation... β β
β β β β β β
β β β β β β
β βββββββββββββββββββββ βββββββββββββββββββββ β
β β
β [ Translate β ] [ π Copy ] [ π Clear ] β
β β
Translated: English β Hindi β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Library | Purpose |
|---|---|
| Python | Core language |
| Tkinter | Desktop GUI |
| deep-translator | Google Translate engine (free, no API key) |
ARIA = AI Research & Information Assistant
A desktop chatbot that answers technical questions across 10+ domains using NLP-powered semantic matching β not keyword matching. ARIA understands the meaning of your question, then routes it through a dual-layer intelligence system.
User Question
β
βββββββββββββββββΌβββββββββββββββββ
β LAYER 1 β FAQ Bank β
β 200 Q&A pairs across 10 domainsβ
β TF-IDF Vectorization (bigrams) β
β + Cosine Similarity matching β
βββββββββββββββββ¬βββββββββββββββββ
β
ββββββββββββΌβββββββββββ
β Score β₯ 0.20 ? β
ββββββ¬βββββββββββββββββ
β
βββββββββββββ΄ββββββββββββββββ
β YES β NO (low confidence)
βΌ βΌ
ββββββββββββββββ ββββββββββββββββββββββββ
β FAQ Bank β β LAYER 2 β Claude β
β Answer β β AI API (dynamic) β
β [FAQ β] β β [Claude AI β¨] β
β (instant) β β (any tech question)β
ββββββββββββββββ ββββββββββββββββββββββββ
User Input: "how does ML work?"
β
βΌ
Step 1 β Preprocessing (NLTK)
lowercase β remove punctuation β remove stopwords β stem
"how does ML work?" βββΊ "ml work"
β
βΌ
Step 2 β TF-IDF Vectorization (Scikit-learn, bigrams)
Converts text into a weighted numerical vector
TF = how often a word appears in this question
IDF = how rare the word is across all 200 FAQs
β
βΌ
Step 3 β Cosine Similarity
Compare user vector against all 200 FAQ vectors
Score 1.0 = identical meaning
Score 0.0 = completely unrelated
β
βΌ
Step 4 β Routing Decision
Score β₯ 0.20 β FAQ answer [FAQ β] green badge
Score < 0.20 β Claude API [AI β¨] teal badge
| Domain | Example Questions |
|---|---|
| π€ AI & ML | What is deep learning? What is overfitting? |
| π Python | What is list comprehension? What is a decorator? |
| ποΈ SQL & Databases | What is a JOIN? What is ACID? What is normalization? |
| β Java | What is the JVM? What is multithreading in Java? |
| π Web Dev | What is REST API? What is the DOM? What is React? |
| π‘ LLMs & Gen AI | What is ChatGPT? What is RAG? How do LLMs work? |
| βοΈ Cloud & DevOps | What is Docker? What is Kubernetes? What is CI/CD? |
| π Networking | TCP vs UDP? What is DNS? What is HTTP? |
| π Cybersecurity | What is SQL injection? What is encryption? |
| π» DSA | What is Big O notation? What is a hash table? |
ββββββββββββββββββββββββββββββββββββββββββββββββ
β π€ ARIA β FAQ Chatbot CodeAlpha Task 2 β
β ββββββββββββββββββββββββββββββββββββββββββ β
β β
β ARIA β
β π Hi! I'm ARIA β AI Research & β
β Information Assistant. β
β Ask me anything about AI, ML, Python, β
β SQL, Java, Web Dev, Cloud & more! β
β β
β You β
β what is machine learning β
β β
β ARIA [FAQ β] π€ AI / ML β
β Machine Learning is a subset of AI β
β where systems learn from data without β
β being explicitly programmed... β
β β
β You β
β explain binary search trees β
β β
β ARIA [Claude AI β¨] π¬ General Tech β
β A Binary Search Tree stores nodes where β
β left child < parent < right child... β
β β
β ββββββββββββββββββββββββββββββββββββββββββ β
β [ Type your question here... ] [Send β][π] β
β FAQ Bank: 200 Q&As | Claude AI fallback β
ββββββββββββββββββββββββββββββββββββββββββββββββ
| Library | Purpose |
|---|---|
| Python | Core language |
| NLTK | Tokenization, stopword removal, stemming |
| Scikit-learn | TF-IDF vectorizer + cosine similarity |
| Anthropic API | Claude AI fallback for unknown questions |
| Tkinter | Dark-themed chat interface |
TITAN = Tracking & Identification Technology for Autonomous Networks
A real-time AI object detection and tracking system. Point your webcam at anything β TITAN detects and tracks every object it sees using YOLOv8 and assigns persistent IDs that follow objects across frames.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Webcam / Video File β
ββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β frame-by-frame
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β YOLOv8 Model β
β β
β Divides frame into a grid β
β Each cell predicts: object class + bounding box β
β + confidence score β
β β
β Detects 80 COCO object classes: β
β person, phone, laptop, car, bottle, chair... β
ββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β detected boxes + scores
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ByteTrack β
β β
β Matches detections across frames using IoU β
β Assigns a persistent tracking ID to each object β
β Same object keeps same ID even if briefly hidden β
ββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β labeled + tracked frame
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β OpenCV Display Window β
β β
β Bounding box with corner accents per object β
β Badge: #ID ClassName Confidence% β
β HUD overlay: FPS Β· Object count Β· Model Β· Controls β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
People β person
Vehicles β car, motorcycle, bus, truck, bicycle
Electronics β laptop, phone, TV, keyboard, mouse
Furniture β chair, sofa, bed, dining table
Kitchen β bottle, cup, fork, knife, bowl
Animals β cat, dog, bird, horse
Outdoors β traffic light, stop sign, umbrella
Sports β ball, skateboard, tennis racket
+ many more...
| Model | File | Speed | Accuracy |
|---|---|---|---|
| YOLOv8 Nano | yolov8n.pt | β‘ Fastest | Good |
| YOLOv8 Small | yolov8s.pt | β‘β‘ Fast | Better |
| YOLOv8 Medium | yolov8m.pt | β‘β‘β‘ Moderate | Best |
All model weights (~6β50 MB) auto-download from Ultralytics on first run.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β βββββββββββββββββββββββββββββββββββ β
β β #1 person 94% β β label badge β
β β Β· Β· Β· Β· Β· Β· Β· Β· Β· Β· β€ β corner accents β
β β β β
β β [person detected] β β bounding box β
β β β β
β β Β· Β· Β· Β· Β· Β· Β· Β· Β· Β· β€ β
β βββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββ β HUD (top-right) β
β β FPS : 29.8 β β
β β Objects: 3 β β
β β Model : YOLOV8N β β
β β [ P ] Pause [ Q ] Quit β β
β ββββββββββββββββββββββββββββ β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Key | Action |
|---|---|
P |
Pause / Resume detection |
Q |
Quit detection window |
ββββββββββββββββββββββββββββββββββββββββββββββββ
β π― TITAN CodeAlpha AI Task 4 β
β ββββββββββββββββββββββββββββββββββββββββββ β
β β
β πΉ Video Source β
β β Webcam (index 0) β
β β Video File [Browseβ¦] β
β β
β π§ YOLO Model β
β [ YOLOv8 Nano (fastest) βΌ ] β
β β
β ποΈ Confidence Threshold β
β [βββββββββββββββββββββββββββββ] 0.45 β
β β
β π Live Stats β
β ββββββββββββ¬βββββββββββ¬ββββββββββββ β
β β FPS β Objects β Status β β
β β 29.4 β 4 β Running β β
β ββββββββββββ΄βββββββββββ΄ββββββββββββ β
β β
β [βΆ Start Detection] [β Stop] β
β ββββββββββββββββββββββββββββββββββββββββββ β
β [ P ] Pause / Resume [ Q ] Quit β
ββββββββββββββββββββββββββββββββββββββββββββββββ
| Library | Purpose |
|---|---|
| Python | Core language |
| YOLOv8 (Ultralytics) | Real-time object detection |
| ByteTrack | Persistent object ID tracking across frames |
| OpenCV | Video capture, frame processing, display |
| NumPy | Array math for drawing operations |
| Tkinter | Desktop control panel UI |
- Python 3.9 or higher
pip- Internet connection (model weights + NLTK data auto-download on first run)
pip install deep-translator nltk scikit-learn ultralytics opencv-python numpy anthropic
# Windows set ANTHROPIC_API_KEY=sk-ant-... # Mac / Linux export ANTHROPIC_API_KEY=sk-ant-...
Get a free key at: console.anthropic.com
Without a key, ARIA still works β it uses the FAQ bank for all answers.
Task 1 β Language Translation Tool
cd CodeAlpha_LanguageTranslation
python translator.pyTask 2 β FAQ Chatbot (ARIA)
cd CodeAlpha_FAQChatbot
python chatbot.pyNLTK data downloads automatically on first launch (~2 sec).
Task 4 β Object Detection & Tracking (TITAN)
cd CodeAlpha_ObjectDetection
python detector.pyYOLOv8 weights auto-download on first launch. Select model in UI, click Start Detection.
CodeAlpha-AI-Internship/
β
βββ CodeAlpha_LanguageTranslation/
β βββ translator.py β run this
β βββ requirements.txt
β
βββ CodeAlpha_FAQChatbot/
β βββ chatbot.py β run this
β βββ faqs.py β 200 Q&A knowledge base
β βββ requirements.txt
β
βββ CodeAlpha_ObjectDetection/
β βββ detector.py β run this
β βββ requirements.txt
β
βββ README.md
Raw text βββΊ Preprocessing βββΊ TF-IDF vector βββΊ Cosine score βββΊ Answer
"how ML?" lowercase 200-dim β₯ 0.20? FAQ
stopwords bigrams < 0.20? Claude AI
stemming
- Text preprocessing pipeline: tokenization β stopwords β stemming
- Why TF-IDF captures importance, not just frequency
- How cosine similarity measures semantic closeness regardless of text length
- When to use retrieval (FAQ) vs generation (Claude AI) β and how to combine both
Frame βββΊ YOLO grid βββΊ Box predictions βββΊ ByteTrack βββΊ Display
image NxN cells class + conf IoU match annotated
each predicts bounding box persistent ID frame
- How YOLO divides a frame into a grid and predicts multiple boxes per cell
- What confidence threshold does and how tuning it affects detection sensitivity
- How ByteTrack uses Intersection over Union (IoU) to match detections across frames
- Trade-offs between Nano (speed) vs Medium (accuracy) model sizes
- Threading β keeping the Tkinter UI responsive while OpenCV runs on a background thread
- OOP β separating
DetectionSessionfromControlPanelwith clean callbacks - Threading with
daemon=Trueandroot.after()for safe UI updates try/except ImportErrorpattern for graceful dependency handling- Structuring a multi-file project for clean GitHub submission
- CodeAlpha β for the internship opportunity and well-structured task list
- Ultralytics β for YOLOv8, the cleanest object detection API available
- Anthropic β for Claude AI powering ARIA's dynamic fallback
- NLTK Team β for the NLP toolkit behind ARIA's preprocessing
- Scikit-learn β for TF-IDF and cosine similarity
Pranav BBACA Graduate Modern College of Arts, Science and Commerce, Pune-16