README.md 3.91 KB
Newer Older
Matteo's avatar
Matteo committed
1
# MPAI-CAE ARP Workflow
Matteo Spanio's avatar
Matteo Spanio committed
2

Matteo's avatar
Matteo committed
3
[![MPAI-CAE ARP](https://img.shields.io/badge/MPAI%20CAE--ARP-gray?style=for-the-badge&logo=AppleMusic&logoColor=cyan&link=https://mpai.community/standards/mpai-cae/about-mpai-cae/)](https://mpai.community/standards/mpai-cae/about-mpai-cae/)
Matteo Spanio's avatar
Matteo Spanio committed
4

Matteo's avatar
Matteo committed
5
6
7
8
9
This is the repository containing the MPAI-CAE ARP workflow implementation. The workflow is composed of the following steps:
1. Audio and video analysis;
2. Video irregularity classification;
3. Tape audio restoration;
4. Packaging.
Matteo's avatar
Matteo committed
10

Matteo's avatar
Matteo committed
11
The workflow is implemented as a set of docker containers, each one performing a specific task. The containers are orchestrated by docker-compose. Once the composition is started, the containers will communicate with each other through a shared volume, which will be used to store the intermediate results of the workflow. The starting point of the workflow is a client application, which will specify the input path. The client and the workflow containers communicate via gRPC.
Matteo's avatar
Matteo committed
12

Matteo's avatar
Matteo committed
13
## Requirements
Matteo's avatar
Matteo committed
14

Matteo's avatar
Matteo committed
15
16
17
18
19
The following software is required to run the workflow:
* Docker;
* Docker-compose;
* Python 3.10 or higher.
* poetry
Matteo's avatar
update    
Matteo committed
20
* git
Matteo's avatar
Matteo committed
21
22
23
24
25

## Installation
To install the workflow, clone the repository with (you may need to install git first, and request access to the repository):
```bash
git clone https://gitlab.dei.unipd.it/mpai/workflow.git
Matteo's avatar
update    
Matteo committed
26
cd workflow
Matteo's avatar
Matteo committed
27
28
```

Matteo's avatar
Matteo committed
29
30
31
32
Then, since the workflow has been developed in many repositories (one for each step), you need to clone the submodules with:
```bash
git submodule update --init --recursive
```
Matteo Spanio's avatar
Matteo Spanio committed
33

Matteo's avatar
Matteo committed
34
35
36
37
38
39
40
41
42
43
44
Once the repository is cloned, you need to build the docker images. To do so start docker and run:
```bash
docker compose up -d
```

On the first run, docker will download the base images and build the custom ones. This may take a while.
If everithing went fine, you should be to see the containers running with:
```bash
docker ps
```

Matteo's avatar
update    
Matteo committed
45
46
47
48
49
50
51
Create and copy your digital tape files in the following directories:
```bash
mkdir data
mkdir data/PreservationAudioFile
mkdir data/PreservationAudioVisualFile
```

Matteo's avatar
Matteo committed
52
53
54
55
56
57
58
59
60
61
62
63
64
65
To install the client application, you need to install poetry with:
```bash
pip install poetry
```

Then, you can install the client application by fisrt moving to the client directory:
```bash
cd client
```

And then running:
```bash
poetry install
```
Matteo Spanio's avatar
Matteo Spanio committed
66
67
68

## Usage

Matteo's avatar
Matteo committed
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
If the containers are not running, you can start them with:
```bash
docker compose up -d
```

To run the client application, you need to move to the client directory:
```bash
cd client
```

And then run:
```bash
poetry run mpai-cae-arp -h
```
It will show the help message with some instructions on how to use the client application:
```
usage: mpai-cae-arp [-h] -f FILES_NAME [-s HOST]

The MPAI-CAE ARP client.

options:
  -h, --help            show this help message and exit
  -f FILES_NAME, --files-name FILES_NAME
                        Specify the name of the Preservation files (without extension)
  -s HOST, --host HOST  Specify the host of the server (default is localhost)
```

The application expects to find the input files in the `data` directory, that is shared with the containers and should have the following structure:
```
data
├── PreservationAudioFile
│   ├── BERIO052.wav
│   └── BERIO100.wav
└── PreservationAudioVisualFile
    ├── BERIO052.mov
    └── BERIO100.mov
```

Matteo's avatar
update    
Matteo committed
107
108
109
110
111
112
113
To execute this program for file `BERIO100` prompt:
```
poetry run mpai-cae-arp -f BERIO100
```

It will take a while. When you see the message "Success", you can open the data folder where you will find the restoration files.

Matteo Spanio's avatar
Matteo Spanio committed
114
## Support
Matteo's avatar
update    
Matteo committed
115
If you require additional information or have any problem running the software, please contact us at:
Matteo's avatar
Matteo committed
116
* Matteo Spanio (dev2@audioinnova.com)
Matteo Spanio's avatar
Matteo Spanio committed
117
118

## Authors and acknowledgment
Matteo's avatar
update    
Matteo committed
119
120
121
122
This project was developed by:
* Nadir Dalla Pozza (University of Padova);
* Niccolò Pretto (University of Padova);
* Sergio Canazza (University of Padova).
Matteo Spanio's avatar
Matteo Spanio committed
123

Matteo's avatar
update    
Matteo committed
124
125
## License
This project is licensed with [GNU GPL v3.0](https://www.gnu.org/licenses/gpl-3.0.html).