Skip to content

Sumu004/Crime-Detection-Alpa

 
 

Repository files navigation

YOLO Detection with IPFS and AWS Lambda Integration

This repository provides a setup to run YOLO-based object detection, integrated with IPFS for decentralized file storage, and an AWS Lambda function for managing detections via API Gateway. Follow the steps below to set up and run the project.

Clone the Repository

Clone this repository to your local machine:

git clone https://github.com/wepandas4/Crime-Detection.git
cd Crime-Detection

Set Up Virtual Environment

Make sure you have Python 3.11 installed on your system. Then, create a virtual environment:

python3.11 -m venv venv
venv\Scripts\activate  # On Linux, use `source venv/bin/activate`

Install Dependencies

With the virtual environment activated, install the required packages:

pip install -r requirements.txt

Prepare YOLO Models

  1. Create a directory to store your YOLO models:

    mkdir models
  2. Place your YOLO model files in the models directory. Ensure they are correctly named and compatible with the code.

Install IPFS

Install IPFS Desktop and IPFS CLI (also known as IPFS Kubo) as follows:

  1. Download IPFS Desktop from IPFS Desktop Downloads.

  2. Install IPFS Kubo (CLI):

    • Follow the official instructions for installing Kubo from IPFS Kubo.
    • Once installed, you can initialize IPFS with the following command:
      ipfs init
    • To start the IPFS daemon:
      ipfs daemon

Set Up DynamoDB and CLI

  1. Create a DynamoDB Table:

    • Go to the AWS DynamoDB Console.
    • Create a new table with the desired primary key and attributes same as in pushHash.py.
  2. Install AWS CLI:

    • Follow the instructions on Installing the AWS CLI.
    • Configure the AWS CLI with your credentials:
      aws configure
    • You can now manage DynamoDB and other AWS services from the command line.

Create AWS Lambda Function

  1. Create a Lambda Function:

    • In the AWS Lambda Console, create a new Lambda function.
    • Upload lambda_function.py as the function code for processing.
    • Set up an API Gateway trigger for the function, which will allow it to be called via HTTP requests.
  2. Integrate Lambda in Control Station:

    • Use the API Gateway endpoint in Control Station/app.py to connect the Lambda function for API calls from the application.

Run Detection and Control Station

  1. Start the main detection script:

    python main.py
  2. Run the Control Station (Flask app):

    cd "Control Station"
    flask run
  3. After detection completes, stop main.py by terminating the process.

Your setup is complete! You can now start detecting objects with YOLO and manage results through the Control Station interface.

About the Team

This project was developed by our dedicated team. We are proud of our collective efforts and the innovative solutions we've created!

Team Member GitHub Profile Email
Priyanka M K Priyaaaa2 priyankamk2903@gmail.com
Sumukh C Sumu004 sumukhchaluvaraj@gmail.com
Ravi J Gowda RaviGowda29 ravigowdaedu29@gmail.com
Yashwanth M yashwanthm3012 dev.yashwanthm3012@gmail.com

We appreciate the hard work and collaboration that made this project possible!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 80.4%
  • HTML 13.3%
  • CSS 6.3%