{"id":20316078,"url":"https://github.com/pushtogithub23/celebrityfacedetection-yolov8","last_synced_at":"2026-06-08T15:31:55.431Z","repository":{"id":259011994,"uuid":"876094149","full_name":"Pushtogithub23/CelebrityFaceDetection-YOLOv8","owner":"Pushtogithub23","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-21T14:46:59.000Z","size":3927,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-21T18:00:01.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pushtogithub23.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-10-21T11:46:40.000Z","updated_at":"2024-10-21T14:47:10.000Z","dependencies_parsed_at":"2024-10-21T18:15:23.505Z","dependency_job_id":null,"html_url":"https://github.com/Pushtogithub23/CelebrityFaceDetection-YOLOv8","commit_stats":null,"previous_names":["pushtogithub23/celebrityfacedetection-yolov8"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pushtogithub23/CelebrityFaceDetection-YOLOv8","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pushtogithub23%2FCelebrityFaceDetection-YOLOv8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pushtogithub23%2FCelebrityFaceDetection-YOLOv8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pushtogithub23%2FCelebrityFaceDetection-YOLOv8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pushtogithub23%2FCelebrityFaceDetection-YOLOv8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pushtogithub23","download_url":"https://codeload.github.com/Pushtogithub23/CelebrityFaceDetection-YOLOv8/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pushtogithub23%2FCelebrityFaceDetection-YOLOv8/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34069489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-14T18:24:11.716Z","updated_at":"2026-06-08T15:31:55.406Z","avatar_url":"https://github.com/Pushtogithub23.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Celebrity Face Detection using YOLOv8\n\nThis project demonstrates how to train a YOLOv8 model for celebrity face detection using a custom dataset from Roboflow. The model is capable of identifying and localizing celebrity faces in images.\n\n![virat_labelled (1)](https://github.com/user-attachments/assets/09393f0e-a5fe-44a5-8980-4a0c3e2d3da2)\n\n![sharapova_labelled](https://github.com/user-attachments/assets/1637650c-7c8e-403f-ac73-87880385abb9)\n\n\n## Table of Contents\n- [Overview](#overview)\n- [Installation](#installation)\n- [Dataset](#dataset)\n- [Model Training](#model-training)\n- [Usage](#usage)\n- [Results](#results)\n- [Future Improvements](#future-improvements)\n- [Project Link](#project-link)\n\n## Overview\n\nThis project uses the YOLOv8 object detection model to detect celebrity faces in images. The model is trained on a custom dataset created and annotated using Roboflow.\n\n## Installation\n\nTo set up the project, you need to install the required dependencies:\n\n```bash\npip install ultralytics roboflow\n```\n\n## Dataset\n\nThe dataset used in this project is a custom celebrity face detection dataset created and annotated on Roboflow. To access the dataset:\n\n1. Sign up for a Roboflow account and obtain an API key.\n2. Use the following code to download the dataset:\n\n```python\nfrom roboflow import Roboflow\nrf = Roboflow(api_key=\"YOUR-API-KEY\")\nproject = rf.workspace(\"puspendu-ai-vision-workspace\").project(\"celebrity-face-detection\")\nversion = project.version(1)\ndataset = version.download(\"yolov8\")\n```\n\n3. You can also download the dataset locally on your machine by visiting the project [here](https://universe.roboflow.com/puspendu-ai-vision-workspace/celebrity-face-detection)\n\nThe dataset is organized into train, validation, and test splits, ready for use with YOLOv8.\n\n## Model Training\n\nTo train the YOLOv8 model on the celebrity face detection dataset:\n\n```python\nfrom ultralytics import YOLO\n\nmodel = YOLO(\"yolov8l.pt\")  # Initialize with pre-trained weights\nmodel.train(\n    data=\"Celebrity-Face-Detection-1/data.yaml\",\n    epochs=50,\n    imgsz=640\n)\n```\n\nThe trained model will be saved in the `runs/detect/train` directory.\n\n## Usage\n\nAfter training, you can use the model to detect celebrity faces in new images:\n\n```python\ndef display_prediction(image_path, save_fig = False, filename = None):\n    \"\"\"\n    Function to display predictions on a given image using our trained model.\n    \n    Args:\n    image_path (str): Path to the input image\n    \"\"\"\n    # Load the trained model\n    trained_model = YOLO(\"runs/detect/train4/weights/best.pt\")\n    \n    # Make predictions\n    result = trained_model.predict(source=image_path, conf = 0.5)\n    \n    # Convert the result to RGB for display\n    rgb_image = cv.cvtColor(result[0].plot(), cv.COLOR_BGR2RGB)\n    \n    # Display the result\n    fig = plt.figure(figsize=(10, 8))\n    plt.imshow(rgb_image)\n    plt.axis('off')\n\n    save_dir = 'DATA/predicted_images'\n    if save_fig and filename:\n        file_path = os.path.join(save_dir, filename)\n        fig.savefig(file_path, dpi = 200, bbox_inches='tight')\n    plt.show()\n```\n\n## Results\n\nThe model has been tested on various celebrity images and demonstrates promising results in detecting and localizing celebrity faces. You can find example outputs in the notebook. I have included some prediction results below.\n\n![Virat_labelled](https://github.com/user-attachments/assets/0d30f6c1-49b3-497c-8242-91fb7879ff32)\n\n![katherine_labelled](https://github.com/user-attachments/assets/a7332743-55db-4155-ba88-143f29f69568)\n\n![virat_labelled_1](https://github.com/user-attachments/assets/00356aaa-6dcf-4485-b5a9-45fa89e1e8b9)\n\n## Future Improvements\n\nTo enhance the model's performance, consider:\n\n1. Experimenting with different YOLOv8 variants (nano, small, medium, large, extra-large)\n2. Adjusting training parameters (learning rate, batch size, etc.)\n3. Augmenting the dataset to increase its size and variety\n4. Fine-tuning the model on a larger, more diverse dataset of celebrity faces\n\n## Project Link\n\nYou can check out the project on Roboflow by clicking [here](https://universe.roboflow.com/puspendu-ai-vision-workspace/celebrity-face-detection)\n\nYou can view the training results on wandb by clicking [here](https://wandb.ai/ranapuspendu24-iit-madras-foundation/Ultralytics/runs/mvtx6xnr?nw=nwuserranapuspendu24)\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushtogithub23%2Fcelebrityfacedetection-yolov8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpushtogithub23%2Fcelebrityfacedetection-yolov8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushtogithub23%2Fcelebrityfacedetection-yolov8/lists"}