Skip to content

Commit

Permalink
Merge pull request #15 from epam/develop
Browse files Browse the repository at this point in the history
Update external link and LF format.
  • Loading branch information
druzhynin-oleksii authored Nov 29, 2021
2 parents 3599f5d + cd5e18f commit 686ce0e
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 219 deletions.
194 changes: 1 addition & 193 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,193 +1 @@
![Model Prototyping Sequence Diagram](docs/images/screen_model_garden_gallery.png)

<div align="center"><h2>Computer Vision Model Garden</h2></div>

## Goals and Prerequisites

**Project Goal**: Provide convenient tool for management of
[Computer Vision](www.wikipedia.org/wiki/Computer_vision)
[datasets](www.wikipedia.org/wiki/Data_set) within projects providing numerous
experiments with visual images.

**Solved Problem**: [Computer Vision](www.wikipedia.org/wiki/Computer_vision)
projects providing numerous experiments with the image data usually needs
collaborative sharing of these data and supporting wide range of
[datasets](www.wikipedia.org/wiki/Data_set) formats.

Among popular image dataset annotation tools
<a href="www.github.com/opencv/cvat">github.com/opencv/cvat</a> has so far a
largest number of supported formats ([Pascal VOC](host.robots.ox.ac.uk/pascal/VOC),
YOLO, [COCO](www.cocodataset.org), etc., see the table
[below](#existing-solutions)).

<a href="www.github.com/opencv/cvat">Computer Vision Annotation Tool (CVAT)/a>
open-sourced by <a href="Intel.com">Intel</a> just lucking the support of such
clouds like [AWS](www.aws.amazon.com). CVAT team has shared a
<a href="www.github.com/opencv/cvat/issues/863">post</a> saying that the AWS
"issue in backlog at the moment till we have resources to cover it".

The Model Garden tool is an addition to CVAT providing the following functionality:
* store in [S3](www.wikipedia.org/wiki/Amazon_S3), reuse and modify image
datasets using CVAT tool
* collaborative usage of datasets through web interface
* prevent labeling tool crash consequences

**NOTE**: The currently supported version of CVAT backend API is
[0.6.1](www.github.com/openvinotoolkit/cvat/tree/v0.6.1).

### Top Existing Solutions

<table style="width:100%">
<tr>
<th style="text-align:center">Usage Order</th>
<th style="text-align:center">Tool</th>
<th style="text-align:center">Publisher</th>
<th style="text-align:center">Web</th>
<th style="text-align:center">Cloud</th>
<th style="text-align:center">Pascal VOC</th>
<th style="text-align:center">YOLO</th>
<th style="text-align:center">COCO</th>
<th style="text-align:center">MASK</th>
<th style="text-align:center">TFRecord</th>
<th style="text-align:center">MOT</th>
</tr>
<tr>
<td>1</td>
<td><a href="www.github.com/tzutalin/labelImg">github.com/tzutalin/labelImg</a></td>
<td><a href="tzutalin.github.io"><i>private</i></a></td>
<td style="text-align:center">N</td>
<td style="text-align:center">N</td>
<td style="text-align:center">Y</td>
<td style="text-align:center">Y</td>
<td style="text-align:center">N</td>
<td style="text-align:center">N</td>
<td style="text-align:center">N</td>
<td style="text-align:center">N</td>
</tr>
<tr>
<td>2</td>
<td><a href="www.github.com/opencv/cvat">github.com/opencv/cvat</a></td>
<td><a href="Intel.com">Intel</a></td>
<td style="text-align:center"><b>Y</b></td>
<td style="text-align:center"><a href="www.github.com/opencv/cvat/issues/863">N</a></td>
<td style="text-align:center"><b>Y</b></td>
<td style="text-align:center"><b>Y</b></td>
<td style="text-align:center"><b>Y</b></td>
<td style="text-align:center"><b>Y</b></td>
<td style="text-align:center"><b>Y</b></td>
<td style="text-align:center"><b>Y</b></td>
</tr>
<tr>
<td>3</td>
<td><a href="www.github.com/microsoft/VoTT">github.com/microsoft/VoTT</a></td>
<td><a href="Microsoft.com">Microsoft</a></td>
<td style="text-align:center">N</td>
<td style="text-align:center">Y</td>
<td style="text-align:center">Y</td>
<td style="text-align:center"><a href="www.github.com/microsoft/VoTT/issues/803">N</a></td>
<td style="text-align:center">N</td>
<td style="text-align:center">N</td>
<td style="text-align:center">N</td>
<td style="text-align:center">N</td>
</tr>
</table>

## Project Support

Model Garden was started as [EPAM Systems](www.epam.com) internal initiative to
support EPAM Computer Vision teams (e.g.
[Vudoku Accelerator](www.epam.com/careers/blog/vudoku-smart-tv-an-innovative-solution-for-video-content-rotation)).

The project is open sourced with the support of [epam.github.io](epam.github.io).

## Technical Features

**‍🖌️ Material Design**: **Intuitive** UI based on the world's most widespread
design language.

**🏃 Single Page Application**: Fast, responsive ux to get what you need done
without waiting for full-screen refreshes.

**🐍 Python Django and Postgres**

**🏷 AWS S3 DataSet Gallery**
![Model Garden DataSet Galery](docs/images/screen_model_garden_dataset.png)
![Model Garden DataSet Saved in S3](docs/images/screen_model_garden_dataset_s3.png)

## Use Cases

### Model Prototyping

Model Garden supports case when with only one data scientist works on the
project (does labeling and ML training). This can be useful for experimental
projects.

![Model Prototyping Sequence Diagram](docs/images/use_case_model_prototyping.png)

### Collaborative DataSet Labeling

Model Garden supports the case of Massive parallel labeling when a manager has a
lot of images and a list of labels. In this case, the manager can upload
DataSet, create a list of labels, and assign certain DataSet parts to different
labelers, and next control their work.

![Model Prototyping Sequence Diagram](docs/images/use_case_collaborative_dataset_labeling.png)

## DataFlow

Material Garden is a mediator between CVat (one of the most popular open-source
annotation tool for computer vision) and Amazon S3 (object storage service).

Status Worker is part of Material Garden. This worker checks event updates from
CVAT asynchronously.

![Model Prototyping Sequence Diagram](docs/images/architecture/architecture_model_garden_dataflow.png)

## CI/CD

The example of [Continuous Deployment](https://en.wikipedia.org/wiki/Continuous_deployment)
to the cloud container registry as well as the cloud update is set with help of
[GitLab CI/CD](docs.gitlab.com/ee/ci/) [.gitlab-ci.yml](.gitlab-ci.yml) file.

[.gitlab-ci.yml](.gitlab-ci.yml) file needs the following
[GitLab CI/CD nvironment variables](https://docs.gitlab.com/ee/ci/variables/) set:

```
DEV_AWS_ACCESS_KEY_ID=<ABCDEFGHIJKLMNOPQRST>*
DEV_AWS_SECRET_ACCESS_KEY=<abcdefghijklmnopqrstuvwxyz0123456789-+/>*
DEV_BACKEND_ECR_URI=123456789000.dkr.ecr.eu-central-1.amazonaws.com/model_garden_backend
DEV_FRONTEND_ECR_URI=123456789000.dkr.ecr.eu-central-1.amazonaws.com/model_garden_frontend
PROD_AWS_ACCESS_KEY_ID='<ABCDEFGHIJKLMNOPQRST>*'
PROD_AWS_SECRET_ACCESS_KEY=<abcdefghijklmnopqrstuvwxyz0123456789-+/>*'
PROD_BACKEND_ECR_URI=123456789000.dkr.ecr.eu-central-1.amazonaws.com/model_garden_backend
PROD_FRONTEND_ECR_URI=123456789000.dkr.ecr.eu-central-1.amazonaws.com/model_garden_frontend
RELEASE_AWS_ACCESS_KEY_ID='<ABCDEFGHIJKLMNOPQRST>*'
RELEASE_AWS_SECRET_ACCESS_KEY=<abcdefghijklmnopqrstuvwxyz0123456789-+/>*'
RELEASE_BACKEND_ECR_URI=123456789000.dkr.ecr.eu-central-1.amazonaws.com/model_garden_backend
RELEASE_FRONTEND_ECR_UR=123456789000.dkr.ecr.eu-central-1.amazonaws.com/model_garden_frontend
```

## Installation

### Installation Specifications
- [CVAT Installation Guide](cvat/README.md)
- See installation steps for backend developers in
[<model_garden_root>/backend/README.md](backend/README.md)
- See installation steps for frontend developers in
[<model_garden_root>/frontend/README.md](frontend/README.md)

### Deployment

See all the details in the [<model_garden_root>/deploy/README.md](deploy/README.md).

If [CI/CD](https://en.wikipedia.org/wiki/CI/CD) is set via
[.gitlab-ci.yml](.gitlab-ci.yml) the build pipeline is started automatically
after commits to **master** and **develop** branches


### Contacts

* <a href="mailto:[email protected]">Model Garden Initiative DL</a>
* <a href="mailto:[email protected]">EPAM Open Source Community</a>
![Model Prototyping Sequence Diagram](docs/images/screen_model_garden_gallery.png)<div align="center"><h2>Computer Vision Model Garden</h2></div>## Goals and Prerequisites**Project Goal**: Provide convenient tool for management of [Computer Vision](http://www.wikipedia.org/wiki/Computer_vision) [datasets](http://www.wikipedia.org/wiki/Data_set) within projects providing numerous experiments with visual images.**Solved Problem**: [Computer Vision](http://www.wikipedia.org/wiki/Computer_vision) projects providing numerous experiments with the image data usually needs collaborative sharing of these data and supporting wide range of [datasets](http://www.wikipedia.org/wiki/Data_set) formats.Among popular image dataset annotation tools <a href="http://www.github.com/opencv/cvat">github.com/opencv/cvat</a> has so far a largest number of supported formats ([Pascal VOC](http://host.robots.ox.ac.uk/pascal/VOC), YOLO, [COCO](http://www.cocodataset.org), etc., see the table [below](#top-existing-solutions)).<a href="http://www.github.com/opencv/cvat">Computer Vision Annotation Tool (CVAT)/a> open-sourced by <a href="Intel.com">Intel</a> just lucking the support of such clouds like [AWS](http://www.aws.amazon.com). CVAT team has shared a <a href="http://www.github.com/opencv/cvat/issues/863">post</a> saying that the AWS "issue in backlog at the moment till we have resources to cover it".The Model Garden tool is an addition to CVAT providing the following functionality: * store in [S3](http://www.wikipedia.org/wiki/Amazon_S3), reuse and modify image datasets using CVAT tool * collaborative usage of datasets through web interface * prevent labeling tool crash consequences**NOTE**: The currently supported version of CVAT backend API is [0.6.1](http://www.github.com/openvinotoolkit/cvat/tree/v0.6.1).### Top Existing Solutions<table style="width:100%"> <tr> <th style="text-align:center">Usage Order</th> <th style="text-align:center">Tool</th> <th style="text-align:center">Publisher</th> <th style="text-align:center">Web</th> <th style="text-align:center">Cloud</th> <th style="text-align:center">Pascal VOC</th> <th style="text-align:center">YOLO</th> <th style="text-align:center">COCO</th> <th style="text-align:center">MASK</th> <th style="text-align:center">TFRecord</th> <th style="text-align:center">MOT</th> </tr> <tr> <td>1</td> <td><a href="http://www.github.com/tzutalin/labelImg">github.com/tzutalin/labelImg</a></td> <td><a href="tzutalin.github.io"><i>private</i></a></td> <td style="text-align:center">N</td> <td style="text-align:center">N</td> <td style="text-align:center">Y</td> <td style="text-align:center">Y</td> <td style="text-align:center">N</td> <td style="text-align:center">N</td> <td style="text-align:center">N</td> <td style="text-align:center">N</td> </tr> <tr> <td>2</td> <td><a href="http://www.github.com/opencv/cvat">github.com/opencv/cvat</a></td> <td><a href="Intel.com">Intel</a></td> <td style="text-align:center"><b>Y</b></td> <td style="text-align:center"><a href="http://www.github.com/opencv/cvat/issues/863">N</a></td> <td style="text-align:center"><b>Y</b></td> <td style="text-align:center"><b>Y</b></td> <td style="text-align:center"><b>Y</b></td> <td style="text-align:center"><b>Y</b></td> <td style="text-align:center"><b>Y</b></td> <td style="text-align:center"><b>Y</b></td> </tr> <tr> <td>3</td> <td><a href="http://www.github.com/microsoft/VoTT">github.com/microsoft/VoTT</a></td> <td><a href="Microsoft.com">Microsoft</a></td> <td style="text-align:center">N</td> <td style="text-align:center">Y</td> <td style="text-align:center">Y</td> <td style="text-align:center"><a href="http://www.github.com/microsoft/VoTT/issues/803">N</a></td> <td style="text-align:center">N</td> <td style="text-align:center">N</td> <td style="text-align:center">N</td> <td style="text-align:center">N</td> </tr></table>## Project SupportModel Garden was started as [EPAM Systems](http://www.epam.com) internal initiative tosupport EPAM Computer Vision teams (e.g. [Vudoku Accelerator](http://www.epam.com/careers/blog/vudoku-smart-tv-an-innovative-solution-for-video-content-rotation)). The project is open sourced with the support of [epam.github.io](http://epam.github.io).## Technical Features**‍🖌️ Material Design**: **Intuitive** UI based on the world's most widespreaddesign language.**🏃 Single Page Application**: Fast, responsive ux to get what you need donewithout waiting for full-screen refreshes.**🐍 Python Django and Postgres****🏷 AWS S3 DataSet Gallery**![Model Garden DataSet Galery](docs/images/screen_model_garden_dataset.png)![Model Garden DataSet Saved in S3](docs/images/screen_model_garden_dataset_s3.png)## Use Cases### Model PrototypingModel Garden supports case when with only one data scientist works on the project (does labeling and ML training). This can be useful for experimental projects.![Model Prototyping Sequence Diagram](docs/images/use_case_model_prototyping.png)### Collaborative DataSet LabelingModel Garden supports the case of Massive parallel labeling when a manager has a lot of images and a list of labels. In this case, the manager can upload DataSet, create a list of labels, and assign certain DataSet parts to different labelers, and next control their work.![Model Prototyping Sequence Diagram](docs/images/use_case_collaborative_dataset_labeling.png)## DataFlowMaterial Garden is a mediator between CVat (one of the most popular open-source annotation tool for computer vision) and Amazon S3 (object storage service).Status Worker is part of Material Garden. This worker checks event updates from CVAT asynchronously.![Model Prototyping Sequence Diagram](docs/images/architecture/architecture_model_garden_dataflow.png)## CI/CDThe example of [Continuous Deployment](http://www.wikipedia.org/wiki/Continuous_deployment) to the cloud container registry as well as the cloud update is set with help of [GitLab CI/CD](http://docs.gitlab.com/ee/ci/) [.gitlab-ci.yml](.gitlab-ci.yml) file.[.gitlab-ci.yml](.gitlab-ci.yml) file needs the following [GitLab CI/CD nvironment variables](http://docs.gitlab.com/ee/ci/variables/) set:```DEV_AWS_ACCESS_KEY_ID=<ABCDEFGHIJKLMNOPQRST>*DEV_AWS_SECRET_ACCESS_KEY=<abcdefghijklmnopqrstuvwxyz0123456789-+/>*DEV_BACKEND_ECR_URI=123456789000.dkr.ecr.eu-central-1.amazonaws.com/model_garden_backendDEV_FRONTEND_ECR_URI=123456789000.dkr.ecr.eu-central-1.amazonaws.com/model_garden_frontendPROD_AWS_ACCESS_KEY_ID='<ABCDEFGHIJKLMNOPQRST>*'PROD_AWS_SECRET_ACCESS_KEY=<abcdefghijklmnopqrstuvwxyz0123456789-+/>*'PROD_BACKEND_ECR_URI=123456789000.dkr.ecr.eu-central-1.amazonaws.com/model_garden_backendPROD_FRONTEND_ECR_URI=123456789000.dkr.ecr.eu-central-1.amazonaws.com/model_garden_frontendRELEASE_AWS_ACCESS_KEY_ID='<ABCDEFGHIJKLMNOPQRST>*'RELEASE_AWS_SECRET_ACCESS_KEY=<abcdefghijklmnopqrstuvwxyz0123456789-+/>*'RELEASE_BACKEND_ECR_URI=123456789000.dkr.ecr.eu-central-1.amazonaws.com/model_garden_backendRELEASE_FRONTEND_ECR_UR=123456789000.dkr.ecr.eu-central-1.amazonaws.com/model_garden_frontend``` ## Installation### Installation Specifications- [CVAT Installation Guide](cvat/README.md)- See installation steps for backend developers in [<model_garden_root>/backend/README.md](backend/README.md)- See installation steps for frontend developers in [<model_garden_root>/frontend/README.md](frontend/README.md)### DeploymentSee all the details in the [<model_garden_root>/deploy/README.md](deploy/README.md).If [CI/CD](http://www.wikipedia.org/wiki/CI/CD) is set via [.gitlab-ci.yml](.gitlab-ci.yml) the build pipeline is started automatically after commits to **master** and **develop** branches### Contacts* <a href="mailto:[email protected]">Model Garden Initiative DL</a>* <a href="mailto:[email protected]">EPAM Open Source Community</a>
Expand Down
22 changes: 11 additions & 11 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Database

### Local Database (not recommended - use docker)
www.postgresql.org/download (the current ver. 12.3)
[www.postgresql.org/download](http://www.postgresql.org/download) (the current ver. 12.3)

<table style="width:100%">
<tr>
Expand Down Expand Up @@ -45,36 +45,36 @@ docker-compose up -d postgres
```

The is no need to build the image, because
[postgres:12-alpine](www.github.com/docker-library/postgres/tree/master/12/alpine)
[postgres:12-alpine](http://www.github.com/docker-library/postgres/tree/master/12/alpine)
is already pre-build.

Run from [<model_garden_root>](..) `docker-compose exec postgres psql
-U postgres -W <password> model_garden` to access the database via command line.

## Superuser
See in [<model_garden_root>/backend/.env](.env) file.
See in [<model_garden_root>/backend/.env]() file.

## Installation

### CVAT Installation
1. Follow all the steps in [CVAT Installation Guide](../cvat/README.md).

2. Add to the installed CVAT a superuser with `CVAT_ROOT_USER_NAME` and
`CVAT_ROOT_USER_PASSWORD` specified in [<model_garden_root>/backend/.env](.env)
`CVAT_ROOT_USER_PASSWORD` specified in [<model_garden_root>/backend/.env]()
(see [Add Backend .env File](#add-backend-env-file) below).

### CVAT API

**NOTE**: The currently supported version of CVAT backend API is
[0.6.1](www.github.com/openvinotoolkit/cvat/tree/v0.6.1).
[0.6.1](http://www.github.com/openvinotoolkit/cvat/tree/v0.6.1).

[<model_garden_root>/backend/CVAT.postman_collection.json](CVAT.postman_collection.json)
is prepared for [Postman API debug client](www.postman.com) to evaluate used
is prepared for [Postman API debug client](http://www.postman.com) to evaluate used
backend API calls to CVAT API in isolation from Model Garden code itself (see a
guide about [Collections In Postman](www.toolsqa.com/postman/collections-in-postman)).
guide about [Collections In Postman](http://www.toolsqa.com/postman/collections-in-postman)).

### Add Backend .env File
Create [<model_garden_root>/backend/.env](.env).
Create [<model_garden_root>/backend/.env]().

```
AWS_ACCESS_KEY_ID='<ABCDEFGHIJKLMNOPQRST>*'
Expand Down Expand Up @@ -128,12 +128,12 @@ $ pip install -r requirements.txt -r test-requirements.txt
```

### Run Migrations
Migrate the database from [<model_garden_root>/backend/](backend) dir:
Migrate the database from [<model_garden_root>/backend/](../backend) dir:
```
$ python ./manage.py migrate
```
### Reset Database
Reset the database from [<model_garden_root>/backend/](backend) dir:
Reset the database from [<model_garden_root>/backend/](../backend) dir:
```
$ python ./manage.py reset_db
```
Expand Down Expand Up @@ -161,7 +161,7 @@ python worker.py
```

## PyCharm
See www.stackoverflow.com/questions/33868806/configuring-pycharm-with-existing-virtualenv
See http://www.stackoverflow.com/questions/33868806/configuring-pycharm-with-existing-virtualenv

## Docker

Expand Down
Loading

0 comments on commit 686ce0e

Please sign in to comment.