Docsity

ML Engineering Internship document, Summaries of Technology

Toggle sidebar
bg1
Assignment: Building an Object Detection Web App
and Deploying it on Hugging Face Spaces
Objective:
To assess the ability to create an Object Detection web app using a finetuned model, build an
interactive interface using Gradio or Streamlit, and deploy the web app on Hugging Face
Spaces.
Assignment Tasks:
Part 1: Object Detection Model
1. Finetune:
- Fine YOLOv10 from https://docs.ultralytics.com/models/yolov10/ OR ANY OBJECT
DETECTION MODEL OF YOUR CHOICE on the BCCD Dataset at
https://github.com/Shenggan/BCCD_Dataset in Google Colab:
https://colab.research.google.com/
2. Image Preprocessing:
- Do data augmentation on the given dataset like Rotation, Cropping, etc
3. Model Inference:
- Write a function to take a preprocessed image and perform inference using the fine-tuned
model.
Part 2: Build a Web App using Gradio or Streamlit
4. Interactive Interface:
- Use Gradio or Streamlit to create a simple web app.
pf3

Partial preview of the text

Download ML Engineering Internship document and more Summaries Technology in PDF only on Docsity!

Assignment: Building an Object Detection Web App

and Deploying it on Hugging Face Spaces

Objective:

To assess the ability to create an Object Detection web app using a finetuned model, build an interactive interface using Gradio or Streamlit , and deploy the web app on Hugging Face Spaces.

Assignment Tasks:

Part 1: Object Detection Model

1. Finetune:

  • Fine YOLOv10 from https://docs.ultralytics.com/models/yolov10/ OR ANY OBJECT DETECTION MODEL OF YOUR CHOICE on the BCCD Dataset at https://github.com/Shenggan/BCCD_Dataset in Google Colab: https://colab.research.google.com/

2. Image Preprocessing:

  • Do data augmentation on the given dataset like Rotation, Cropping, etc

3. Model Inference:

  • Write a function to take a preprocessed image and perform inference using the fine-tuned model.

Part 2: Build a Web App using Gradio or Streamlit

4. Interactive Interface:

  • Use Gradio or Streamlit to create a simple web app.
  • Gradio : Build an interface where users can upload images, and the app will display the bounding boxes along with the predicted class and confidence score.
  • Streamlit : Build an interface where users can upload images, and the app will display the bounding boxes along with the predicted class and confidence score.

5. Features to Include:

  • Image upload: Allow the user to upload an image for classification.
  • Display the result: Show the predicted class, confidence score, and bounding box.
  • Table: Showing the Precision and recall for all the classes combined and for each class.

Part 3: Deploy to Hugging Face Spaces

6. Create a Hugging Face Space:

  • Sign up or log in to Hugging Face.
  • Create a new Space under your account. Choose either Gradio or Streamlit as the framework.

7. Push Code to Hugging Face:

  • Push your project code (including the model, app code, and necessary dependencies) to the Hugging Face Space.
  • Ensure you include the appropriate requirements.txt file to install dependencies like torch, gradio, or streamlit.

8. Deploy and Test:

  • Deploy the app on Hugging Face Spaces and test it.
  • Share the Hugging Face Space URL where your web app is running.

Submission Requirements:

  1. GitHub Repository: Provide a link to your GitHub repository containing the code for the web app.
  2. Hugging Face Space URL: Share the link to your deployed app on Hugging Face Spaces.