{"id":27559139,"url":"https://github.com/yousefalaaali/object-localization-with-tensorflow","last_synced_at":"2026-05-10T02:46:38.427Z","repository":{"id":286907961,"uuid":"962950685","full_name":"YousefAlaaAli/Object-Localization-with-TensorFlow","owner":"YousefAlaaAli","description":"Object Localization with TensorFlow and Keras","archived":false,"fork":false,"pushed_at":"2025-04-09T04:57:35.000Z","size":1682,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T23:33:00.125Z","etag":null,"topics":["cnn","computervision","deeplearning","keras","machinelearning","objectlocalization","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YousefAlaaAli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-08T23:35:26.000Z","updated_at":"2025-04-09T04:57:38.000Z","dependencies_parsed_at":"2025-04-09T00:44:55.194Z","dependency_job_id":null,"html_url":"https://github.com/YousefAlaaAli/Object-Localization-with-TensorFlow","commit_stats":null,"previous_names":["yousefalaaali/object-localization-with-tensorflow"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YousefAlaaAli%2FObject-Localization-with-TensorFlow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YousefAlaaAli%2FObject-Localization-with-TensorFlow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YousefAlaaAli%2FObject-Localization-with-TensorFlow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YousefAlaaAli%2FObject-Localization-with-TensorFlow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YousefAlaaAli","download_url":"https://codeload.github.com/YousefAlaaAli/Object-Localization-with-TensorFlow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249830836,"owners_count":21331355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cnn","computervision","deeplearning","keras","machinelearning","objectlocalization","tensorflow"],"created_at":"2025-04-19T23:33:02.732Z","updated_at":"2026-05-10T02:46:38.369Z","avatar_url":"https://github.com/YousefAlaaAli.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧠 Emoji Detection \u0026 Classification with CNN\n\nDetect and classify emojis in images using a Convolutional Neural Network (CNN) model built with TensorFlow/Keras.  \nThis project predicts both the **class** of an emoji and its **location** using a dual-output neural network — one for classification and one for bounding box regression.\n\n---\n\n## 📌 Features\n\n- 🔍 **Emoji Detection** — Locate emoji within the image by predicting bounding box coordinates.  \n- 🎭 **Emoji Classification** — Classify the emoji (e.g., happy, sad, skeptical, etc.).  \n- 📦 **Custom `IoU` Metric** — Measures the overlap between predicted and ground-truth boxes.  \n- 🖼️ **Visualization** — Real-time plotting of predicted vs actual results with bounding boxes.\n\n---\n\n## 🏗️ Model Architecture\n\n- CNN backbone (Conv + MaxPooling layers)\n- Two heads:\n  - `class_out` → `softmax` activation for emoji classification\n  - `box_out` → `linear` activation for bounding box coordinates  \n- Compiled with:\n  ```python\n  model.compile(\n      loss={\n          'class_out': 'categorical_crossentropy',\n          'box_out': 'mse'\n      },\n      optimizer=tf.keras.optimizers.Adam(learning_rate=1e-3),\n      metrics={\n          'class_out': 'accuracy',\n          'box_out': IoU(name='iou')\n      }\n  )\n\n---\n\n\n## 🔍 Output Visualization\nWhen testing the model, the visualization uses the following color-coding:\n\n- **Bounding Boxes**:\n  - ✅ Green box = Ground-truth location (actual position)\n  - ❌ Red box = Model's predicted location\n\n- **Class Labels**:\n  - ✅ Green label = Correct classification\n  - ❌ Red label = Incorrect classification\n\n---\n\n## How to Run\n\n1. **Clone the repository**\n```bash\ngit clone https://github.com/your-username/emoji-detector.git\ncd emoji-detector\n```\n2. **Install dependencies**\n```bash\npip install -r requirements.txt\n```\n3. **Train the model**\n```bash\njupyter notebook train.ipynb\n```\n4. **Test predictions**\n```bash\njupyter notebook test.ipynb\n```\n\n---\n\n## 🔧 Requirements\n- Python 3.6+\n\n- TensorFlow 2.x\n\n- Jupyter Notebook\n\n---\n\n## 📊 Custom IoU Metric\nIncludes a custom tf.keras.metrics.Metric implementation to track bounding box overlap performance across batches.\n\n---\n\n## 🔮 Future Improvements\n- Detect multiple emojis per image\n- Add data augmentation\n- Train on larger, real-world datasets\n- Use YOLO or SSD for real-time detection\n\n---\n\n## 📌 Dependencies\nTensorFlow\n\nNumPy\n\nMatplotlib\n\nPillow (PIL)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyousefalaaali%2Fobject-localization-with-tensorflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyousefalaaali%2Fobject-localization-with-tensorflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyousefalaaali%2Fobject-localization-with-tensorflow/lists"}