Giter Site home page Giter Site logo

izzetsahin / library-seat-occupancy-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asumansaree/library-seat-occupancy-detection

0.0 0.0 0.0 1.52 MB

With using YOLOv7 on video cameras detecting the occupancy time (with belongings, without human) of the seats in the library

Shell 0.08% Python 17.01% Jupyter Notebook 82.87% Dockerfile 0.03%

library-seat-occupancy-detection's Introduction

Project Description

With using YOLOv7 on video cameras detecting the occupancy time (with belongings, without human) of the seats in the library

image

Detailed explanation about the project is in this document: https://docs.google.com/document/d/1pJ2VXuCuY54If5JJqTePYmlqCHkCWHwM6suYYAaN2k4/edit?usp=sharing

Development Environment is Google Colab. Here is the ready-to use Colab Notebook Open In Colab

System Architecture

image

How to Run (Colab)

  • Set your Colab environment with GPU
  • Mount Google Drive (optional). Due to Colab deletes the uploaded files at some point, it is better to upload them once to the Drive and mount the Drive to Notebook. from google.colab import drive drive.mount ("/content/drive")
  • Clone the repository $ !git clone https://github.com/asumansaree/Library-Seat-Occupancy-Detection.git
  • Change the working directory $ %cd "Library-Seat-Occupancy-Detection"
  • Install requirements $ !pip install -r requirements.txt
  • Run the python code with optional arguments and weights. 0: class id for human, 56: class id for chair $ !python detect_and_track.py
    --weights yolov7.pt
    --source "/content/drive/MyDrive/ImageProcessing/seatOccupancyDetectionMiniTrainVideo.mp4"
    --conf-thres 0.4
    --classes 0 56
    --name "YOLOV7_Library_Seat_Detection"
  • To display the video, you have to made this conversion $ path = "/content/Library-Seat-Occupancy-Detection/runs/detect/YOLOV7_Library_Seat_Detection/" !ffmpeg -i {path + "seatOccupancyDetectionMiniTrainVideo.mp4"} -vcodec libx264 {path + "display.mp4"} from IPython.display import HTML from base64 import b64encode mp4 = open(path + 'display.mp4', 'rb').read() data_url = "data:video/mp4;base64," + b64encode(mp4).decode() HTML(""" """ % data_url)

Sample Output

Output file will be created in the "/content/Library-Seat-Occupancy-Detection/runs/detect/YOLOV7_Library_Seat_Detection/{video.mp4}" Output is in the mp4 format. For demonstration purposes in pdf document, it is included as image

ImageProcessing_ProjectReport_AsumanSareERGUT-09

Contact

Contact me for any problem and question [email protected]

References

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.