Hussein El-Hadidy commited on
Commit ·
d26e0b7
1
Parent(s): 676f928
Added readme + enhances
Browse files
README.md
CHANGED
|
@@ -1,12 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# El7a2ny Backend
|
| 2 |
+
|
| 3 |
+
A mobile application built using Flutter. This README provides clear instructions for both developers and non-developers to run or test the app.
|
| 4 |
+
|
| 5 |
---
|
| 6 |
+
|
| 7 |
+
## El7a2ny Overview
|
| 8 |
+
|
| 9 |
+
El7a2ny is an emergency mobile app that tackeles real-life emergency situations and help its users tackle them in a user-friendly way.
|
| 10 |
+
|
| 11 |
+
The app includes 3 main features:
|
| 12 |
+
|
| 13 |
+
- ECG Analysis, export your apple smart watch ECG PDF analysis, import it into our mobile, do a checkup and diagnose your ECG analysis to ensure it is normal or has a kind of abnormalities, and will guide you to the correct procedures accordingly.
|
| 14 |
+
|
| 15 |
+
- Skin burns, got a burn at your home from a stove or boiling water? take a picture and upload it to the app, we will segment the burn, and classify the degree and prompt you with the correct guidlines accordingly.
|
| 16 |
+
|
| 17 |
+
- CPR analysis, with our educational CPR mode, you will be able to do CPR at your home or at centers, capture a video of yourself doing the CPR (Cardiopulmonary resuscitation), upload it to the application, wait for a full informative analysis of the results and how we detect your rate and depth of motion along with posture warnings. Also experience the real-time feature of CPR where you can use the application in case of emergencies, mount the mobile in a portatit mode, then start your live stream, and you are good to go.
|
| 18 |
+
|
| 19 |
---
|
| 20 |
|
| 21 |
+
## Technical Setup
|
| 22 |
+
|
| 23 |
+
This backend is built using FastAPI python framwork,it can be runned locally and it is also deployed on hugging face.
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
# Instructions
|
| 27 |
+
|
| 28 |
+
It is easier to access this backend through its deployed version on hugging face via docker through this base url for most of the applicaiton feature, this includes: SKin Burns, ECG Analysis and CPR Education Mode.
|
| 29 |
+
|
| 30 |
+
"https://husseinhadidy-deploy-el7a2ny-application.hf.space"
|
| 31 |
+
|
| 32 |
+
But running real-time mode of CPR can be tried locally for latency concerns, as hugging face is a free contianer that has low specs, so real-time and socket connection is not tested on the deployed instance.
|
| 33 |
+
|
| 34 |
+
You can use the requirments.txt to install the requirments needed and run using (Python 3.10):
|
| 35 |
+
|
| 36 |
+
```bash
|
| 37 |
+
|
| 38 |
+
uvicorn app:app --host 0.0.0.0 --port 8000
|
| 39 |
+
|
| 40 |
+
```
|
app.py
CHANGED
|
@@ -320,7 +320,7 @@ def run_cpr_analysis(source, requested_fps, output_path):
|
|
| 320 |
requested_fps = 30
|
| 321 |
input_video = source
|
| 322 |
|
| 323 |
-
output_dir = r"
|
| 324 |
os.makedirs(output_dir, exist_ok=True)
|
| 325 |
|
| 326 |
video_output_path = os.path.join(output_dir, "output.mp4")
|
|
@@ -361,7 +361,7 @@ async def websocket_analysis(websocket: WebSocket):
|
|
| 361 |
with analyzer_lock:
|
| 362 |
if not analysis_started:
|
| 363 |
requested_fps = 30
|
| 364 |
-
output_path = r"
|
| 365 |
|
| 366 |
analyzer_thread = threading.Thread(
|
| 367 |
target=run_cpr_analysis,
|
|
|
|
| 320 |
requested_fps = 30
|
| 321 |
input_video = source
|
| 322 |
|
| 323 |
+
output_dir = r"CPRRealTime\outputs"
|
| 324 |
os.makedirs(output_dir, exist_ok=True)
|
| 325 |
|
| 326 |
video_output_path = os.path.join(output_dir, "output.mp4")
|
|
|
|
| 361 |
with analyzer_lock:
|
| 362 |
if not analysis_started:
|
| 363 |
requested_fps = 30
|
| 364 |
+
output_path = r"Output"
|
| 365 |
|
| 366 |
analyzer_thread = threading.Thread(
|
| 367 |
target=run_cpr_analysis,
|