Skip to content

Huawei Tech4City Challenge - Team Predict Guardian Submission#11

Open
hanlim83 wants to merge 34 commits intoej-hw:mainfrom
hanlim83:main
Open

Huawei Tech4City Challenge - Team Predict Guardian Submission#11
hanlim83 wants to merge 34 commits intoej-hw:mainfrom
hanlim83:main

Conversation

@hanlim83
Copy link
Copy Markdown

@hanlim83 hanlim83 commented Jul 14, 2024

Fire/Smoke Detection by team Predict Guardian

Our Code Submission is a full-stack AI web application that detects the presence of flames or smoke in the user's uploaded images.

How to run our application

Docker (Recomended)

  1. Run the docker container via the following command docker run -d -p 8000:8000 --name predict-guardian hanlim82/huawei-tech4city:latest

Locally

  1. cd into the backend directory
  2. Create a python virtual environment (venv) python -m venv venv
  3. Activate the newly created virtual environment
  4. Install the required dependencies via pip pip install -r .\requirements.txt
  5. Run the backend by running uvicorn app:app

NOTE: If you are running Debian/Ubuntu, before Step 4, please run this command apt-get update && apt-get install ffmpeg libsm6 libxext6 -y

How can I access the UI/API?

You will be able to access the user interface and the API via localhost:8000

The API Documentation can be accessed via localhost:8000/docs

Technologies Used

Team Members

We are all year 3 students from SMU School of Computing and Information Systems

hanlim83 and others added 21 commits July 9, 2024 14:49
* Initial AI Model Files

* Initial AI Model Files

* set up backend and gitignore

* Add Model.pt

* Update dependabot.yml

* Restyled by autopep8

* Restyled by black

* Restyled by pyment

* Restyled by reorder-python-imports

* Restyled by whitespace

---------

Co-authored-by: Juay Kai Xun <juaykaixun@hotmail.com>
Co-authored-by: Restyled.io <commits@restyled.io>
* Create Dockerfile

* Restyled by whitespace

---------

Co-authored-by: Restyled.io <commits@restyled.io>
* Initial AI Model Files

* Initial AI Model Files

* set up backend and gitignore

* update backend

* init db

* Versioned Backend Dependencies

* Add Images

* fix backend for sql alchemy

* initial backend integration

* finalise backend

* Restyled by autopep8

* Restyled by black

* Restyled by isort

* Restyled by pyment

* Restyled by reorder-python-imports

* Restyled by whitespace

* Restyled by yapf

---------

Co-authored-by: Lyney <30753183+hanlim83@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
* feat: Uploaded frontend template for uploading

* Added logo

---------

Co-authored-by: Syahmi <mdsyahmi@hotmail.com>
Co-authored-by: Shinkeishi <ashleyytanjx@gmail.com>
Able to serve frontend and static images
* feat: Uploaded frontend template for uploading

* Added logo

* Added minor styling

* Update index.html

---------

Signed-off-by: Ashley Tan <ashleyytanjx@gmail.com>
Co-authored-by: Syahmi <mdsyahmi@hotmail.com>
* Updated Dockerfile

* Update Dockerfile

* Updated javascript import

* fix: Fix dockerfile and dependency imports

---------

Co-authored-by: Shinkeishi <ashleyytanjx@gmail.com>
Signed-off-by: Lyney <30753183+hanlim83@users.noreply.github.com>
* Update Model Implmentation

* Update app.py

* Update app.py

* Restyle Feat/ai model (#19)

* Restyled by autopep8

* Restyled by black

* Restyled by isort

* Restyled by pyment

* Restyled by reorder-python-imports

* Restyled by whitespace

* Restyled by yapf

---------

Co-authored-by: Restyled.io <commits@restyled.io>

---------

Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
Signed-off-by: Lyney <30753183+hanlim83@users.noreply.github.com>
@codeautopilot
Copy link
Copy Markdown

codeautopilot bot commented Jul 14, 2024

PR summary

This Pull Request introduces a full-stack AI web application developed by the Predict Guardian team for the Huawei Tech4City Challenge. The application detects the presence of flames or smoke in user-uploaded images using a customized YOLOv8 model. The backend is built with FastAPI, and the frontend uses Daisy UI and Tailwind CSS. The application can be run using Docker or locally, and it includes endpoints for uploading images and retrieving past results.

Suggestion

  1. Error Handling: Enhance error handling in the backend to provide more specific error messages.
  2. Security: Implement security measures such as input validation and rate limiting to prevent abuse.
  3. Scalability: Consider using a more scalable database solution if the application is expected to handle a large number of uploads.
  4. Testing: Add unit and integration tests to ensure the reliability of the application.
  5. Documentation: Improve documentation to include more detailed setup instructions and API usage examples.

Disclaimer: This comment was entirely generated using AI. Be aware that the information provided may be incorrect.

Current plan usage: 41.45%

Have feedback or need help?
Discord
Documentation
support@codeautopilot.com

@hanlim83 hanlim83 marked this pull request as draft July 14, 2024 10:24
@hanlim83 hanlim83 marked this pull request as ready for review July 14, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants