Spaces:
Sleeping
Sleeping
Clement Vachet
commited on
Commit
·
58d3f79
1
Parent(s):
821e9d8
docs: Improve documentation
Browse files
README.md
CHANGED
|
@@ -14,10 +14,29 @@ short_description: Object detection ECS
|
|
| 14 |
|
| 15 |
<b>Aim: AI-driven object detection task</b>
|
| 16 |
- Front-end: user interface via Gradio library
|
| 17 |
-
- Back-end: use of ECS endpoints to run
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
## Front-end user interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
Use of Gradio library for web interface
|
| 22 |
|
| 23 |
Command line:
|
|
@@ -25,18 +44,32 @@ Command line:
|
|
| 25 |
|
| 26 |
<b>Note:</b> The Gradio app should now be accessible at http://localhost:7860
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
## Back-end ML models
|
| 30 |
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
**Docker hub containers:**
|
| 34 |
-
- DETR
|
| 35 |
-
- YOLOS
|
| 36 |
|
| 37 |
-
|
| 38 |
|
| 39 |
ECS: Elastic Container Service
|
|
|
|
|
|
|
|
|
|
| 40 |
Steps after docker images are available on Docker Hub
|
| 41 |
|
| 42 |
### Step 1. Create a new ECS task definition
|
|
@@ -67,4 +100,6 @@ Steps after docker images are available on Docker Hub
|
|
| 67 |
### Step 4. Update security group for new service
|
| 68 |
- Go to Cluster -> service -> task -> configuration and networking
|
| 69 |
- Click on ```Security Group```
|
| 70 |
-
- Adjust rules for inbound traffic (e.g. traffic only from my_ip)
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
<b>Aim: AI-driven object detection task</b>
|
| 16 |
- Front-end: user interface via Gradio library
|
| 17 |
+
- Back-end: use of AWS ECS endpoints to run Machine Learning models
|
| 18 |
|
| 19 |
+
Menu:
|
| 20 |
+
- [Front-end user interface](#1-front-end-user-interface)
|
| 21 |
+
- [Environment variables](#11-environment-variables)
|
| 22 |
+
- [Local execution](#12-local-execution)
|
| 23 |
+
- [Deployment on Hugging Face](#13-deployment-on-hugging-face)
|
| 24 |
+
- [Back-end Machine Learning models](#2-back-end-machine-learning-models)
|
| 25 |
+
- [Information on ML models](#21-information-on-ml-models)
|
| 26 |
+
- [Deployment on AWS ECS](#22-information-on-aws-ecs-deployment)
|
| 27 |
|
| 28 |
+
## 1. Front-end user interface
|
| 29 |
+
|
| 30 |
+
### 1.1. Environment variables
|
| 31 |
+
|
| 32 |
+
This web app uses two environment variables, corresponding to the endpoints for the deployed machine learning models
|
| 33 |
+
(cf. [Section 2 - Back-end ML models](#2-back-end-ml-models))
|
| 34 |
+
|
| 35 |
+
Environment variables:
|
| 36 |
+
- AWS_DETR_URL: endpoint for DETR model
|
| 37 |
+
- AWS_YOLOS_URL: endpoint for YOLOS model
|
| 38 |
+
|
| 39 |
+
### 1.2. Local execution
|
| 40 |
Use of Gradio library for web interface
|
| 41 |
|
| 42 |
Command line:
|
|
|
|
| 44 |
|
| 45 |
<b>Note:</b> The Gradio app should now be accessible at http://localhost:7860
|
| 46 |
|
| 47 |
+
### 1.3. Deployment on Hugging Face
|
| 48 |
+
|
| 49 |
+
This web application has been deployed on Hugging Face.
|
| 50 |
+
|
| 51 |
+
HF Space URL: https://huggingface.co/spaces/cvachet/object_detection_ecs
|
| 52 |
|
|
|
|
| 53 |
|
| 54 |
+
## 2. Back-end machine learning models
|
| 55 |
+
|
| 56 |
+
Machine Learning (ML) models are available on Docker Hub and have been deployed to AWS ECS (Elastic Container Service)
|
| 57 |
+
|
| 58 |
+
### 2.1. Information on ML models
|
| 59 |
+
**Github repos:**
|
| 60 |
+
- DETR API: https://github.com/clementsan/object_detection_detr_api
|
| 61 |
+
- YOLOS API: https://github.com/clementsan/object_detection_yolos_api
|
| 62 |
|
| 63 |
**Docker hub containers:**
|
| 64 |
+
- DETR API: https://hub.docker.com/r/cvachet/object-detection-detr-api
|
| 65 |
+
- YOLOS API: https://hub.docker.com/r/cvachet/object-detection-yolos-api
|
| 66 |
|
| 67 |
+
### 2.2 Information on AWS ECS deployment
|
| 68 |
|
| 69 |
ECS: Elastic Container Service
|
| 70 |
+
|
| 71 |
+
<details>
|
| 72 |
+
|
| 73 |
Steps after docker images are available on Docker Hub
|
| 74 |
|
| 75 |
### Step 1. Create a new ECS task definition
|
|
|
|
| 100 |
### Step 4. Update security group for new service
|
| 101 |
- Go to Cluster -> service -> task -> configuration and networking
|
| 102 |
- Click on ```Security Group```
|
| 103 |
+
- Adjust rules for inbound traffic (e.g. traffic only from my_ip)
|
| 104 |
+
|
| 105 |
+
</details>
|