Skip to content

kmohan12-code/Object-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

  1. Setup and Imports:

    • You import required libraries like TensorFlow, TensorFlow Hub, and others for image processing and visualization.
  2. Utility Functions:

    • download_and_resize_image: Downloads an image, resizes it, and saves it locally.
    • display_image: Displays an image using Matplotlib.
    • draw_bounding_box_on_image and draw_boxes: Functions for drawing bounding boxes around detected objects.
  3. Object Detection:

    • You load the Faster R-CNN object detection model using TensorFlow Hub.
    • You download a sample image of a kangaroo and process it.
    • The run_detector function handles model inference, outputs detected objects, and overlays bounding boxes with class names and scores.

Object Detection Using TensorFlow Hub

Overview

This project demonstrates object detection using TensorFlow and TensorFlow Hub. The Faster R-CNN model pre-trained on the Open Images V4 dataset is used to detect objects in images. The project includes visualization of detected objects with bounding boxes and class labels.

Features

  • Model: Faster R-CNN (Open Images V4 + Inception ResNet V2)
  • Framework: TensorFlow and TensorFlow Hub
  • Utilities:
    • Download and resize an image
    • Visualize object detection results
    • Annotate images with bounding boxes and class labels

Requirements

  • Python 3.6+
  • TensorFlow 2.x
  • TensorFlow Hub
  • NumPy
  • Matplotlib
  • Pillow ository-folder>
  1. Install dependencies:
    pip install tensorflow tensorflow-hub numpy matplotlib pillow

Usage

  1. Download or provide an image URL.
  2. Run the detection script:
    python object_detection.py

Example Output

Input Image:

A kangaroo image from Wikimedia Commons.

Detected Output:

Objects detected in the image, annotated with bounding boxes and labels.

References

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors