Giter Club home page Giter Club logo

1d-final-project-summer-2024-sds-2024-team-09's Introduction


Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Acknowledgments

About The Project

Product Name Screen Shot

This project is a web application built with Ruby on Rails. It includes a PostgreSQL database and Docker for containerization. The application is designed to manage tasks, providing features such as user authentication, task creation, and progress tracking.

(back to top)

Built With

Frontend:

React

Backend:

Rails Python Google Cloud

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

  • Ruby version: 3.2.4
  • Rails version: 7.1.3
  • Docker version: 20.10.7
  • PostgreSQL version: 13

(back to top)

Key Dependencies

The project uses several key dependencies, including:

  • Rails 7.1.3
  • PostgreSQL
  • Docker
  • RSpec for testing
  • Webpacker for managing JavaScript
  • Turbo and Stimulus for modern Rails development
  • Python: ^3.10, <3.12
  • Poetry Dependencies Manager for Python

(back to top)

For a complete list of dependencies, please refer to the Gemfile in the project repository.

Usage

User Usage

  1. Register: Users can register to create an account.
  2. Get the settings from Agora API: Configure the streaming settings using the Agora API.
  3. Stream: Start a live stream.
  4. Watch: View live streams.
  5. Record Stream: Record streams and save them to history.
  6. Join Telegram Channel: Get notified when a baby crying is detected.
  7. View History: Access manually recorded videos or automatically recorded videos when a baby cries, arranged by dates.

Clone the repository: bash git clone https://github.com/Service-Design-Studio/1d-final-project-summer-2024-sds-2024-team-09.git

Main Backend

  1. Change directory to the repository:
    cd 1d-final-project-summer-2024-sds-2024-team-09
  2. Install dependencies for rails:
    bundle install
  3. Set up the database:
    rails db:create
    rails db:migrate
    rails db:seed
  4. Run the Rails server:
    rails server
  5. Build and run the Docker container: (deploy the program onto a cloud platform)
    docker-compose up --build

(back to top)

Front-end

  1. Change directory to the repository:
    cd 1d-final-project-summer-2024-sds-2024-team-09/frontend
  2. Install dependencies for React:
    npm install
  3. Run executes the dev script for React:
    npm run dev
    or deploy the program onto a cloud platform.

AI feature

  1. Installation:

    cd 1d-final-project-summer-2024-sds-2024-team-09/ai_feature
    poetry install
  2. Set up baby_cry_AI:

    • make a copy of example.env and fill up the necessary fields, including huggingface token and agora token
    • additionally fill in agora token in ai_feature/recording_interval_updated/recording_interval_updated/templates/index.html
    • setup Google Cloud SQL proxy https://cloud.google.com/sql/docs/mysql/sql-proxy
  3. Run the recorder for AI detection: Change directory to the repository:

     ```
     cd ai_feature
     ```
    

    Connect to GCLoud SQL:

     ```
     ./cloud_sql_proxy [your project id]:[your project region]:[your gcloud sql]-sql -p 5432
     ```
    

    Run detection for AI:

     ```
     make run
     ```
    

    Run recording function for detection:

     ```
     cd recording_interval_updated/recording_interval_updated
     python to_record.py
     ```
    
  4. Ensure Connectivity:

    • Verify that all components (backend, AI system, front-end) are properly connected and communicating.

Testing

This project uses a combination of Cucumber for Behavior-Driven Development (BDD) testing and Jest for unit and integration testing of components.

To run the relevant tests, follow these steps:

  1. Cucumber BDD Testing:

    • The Cucumber BDD tests are located in the features directory. This includes the feature files written in Gherkin, step definitions, and any support files necessary for the BDD tests:
      C:\Users\Asus\T5 - SDS\T5-SDS\1d-final-project-summer-2024-sds-2024-team-09\features
    • Running the Cucumber tests:
      1. Navigate to the project root:
        cd C:\Users\Asus\T5 - SDS\T5-SDS\1d-final-project-summer-2024-sds-2024-team-09
      2. Run the Cucumber tests:
        bundle exec cucumber
      • This command will automatically detect and run all the tests in the features directory
  2. Jest Testing:

    • The Jest tests for the frontend components are located in the following directory:
      C:\Users\Asus\T5 - SDS\T5-SDS\1d-final-project-summer-2024-sds-2024-team-09\frontend\src\components\__tests__
    • Running the Jest tests:
      1. Navigate to the frontend directory:
        cd C:\Users\Asus\T5 - SDS\T5-SDS\1d-final-project-summer-2024-sds-2024-team-09\frontend
      2. Run the Jest tests:
        npm test
        or
        npx jest

(back to top)

Architecture


Logo

License

This project is licensed under the CryBaby License.

CryBaby License

CryBaby License

Copyright (c) [2024] [CryBaby]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

(back to top)

Acknowledgments

For any inquiries, questions, or issues, please feel free to contact our team:

(back to top)

Data sources include: Ubenwa CryCeleb2023 ESC-50 Dataset for environmental sound classification, also featuring non-crying samples Audio clips downloaded from YouTube, such as this one Friends who were willing to record there babies crying

Preprocessing The raw audio files were processed into 4-second Mel Spectrogram clips using Librosa, which provides a two-dimensional representation of the sound based on the mel-scale frequencies. The preprocessing routine is integral to Cry Baby's runtime operations and is available here.

Model architecture The model's architecture is inspired by the design presented in this research paper. Below is a visualization of the model structure:

CNN Model visualized

Training and evaluation Training was conducted over 10 epochs with a batch size of 32. The corresponding training and validation loss and accuracy metrics are illustrated below. loss and accuracy metrics

1d-final-project-summer-2024-sds-2024-team-09's People

Contributors

mikexql avatar jingkai27 avatar jyayin avatar sofeanna17 avatar regitiger avatar baronbonet avatar shmoope avatar github-classroom[bot] avatar

Stargazers

 avatar  avatar

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.