File size: 2,542 Bytes
9390e2c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
## Face Video-Analyzer Framework
This demo application provides a general framework for tracking, detecting and extracting features of human faces in images or videos. 
Currently, the following tools  are integrated in a video-demo available at ```./spiga/demo/app.py```:

* Tracking:
    * FaceTracker : RetinaFace + SORT.
    * Detectors:
        * RetinaFace (bbox + 5 landmarks).
            * Backbone Mobilenet 0.25.
            * Backbone Resnet50.
    * Associators:
        * SORT: Frame by frame
* Extractors:
    * SPIGA architecture 
        * Features: Landmarks and headpose.
        * Datasets: 300W Public, 300W Private, WFLW, MERLRAV.
* Viewers:
    * Landmarks, headpose and bbox (score + face_id).

### Demo Application

```
python ./spiga/demo/app.py \
            [--input] \      # Webcam ID or Video Path. Dft: Webcam '0'.
            [--dataset] \    # SPIGA pretrained weights per dataset. Dft: 'wflw'.
            [--tracker] \    # Tracker name. Dft: 'RetinaSort'.
            [--show] \       # Select the attributes of the face to be displayed. Dft: ['fps', 'face_id', 'landmarks', 'headpose']
            [--save] \       # Save record.
            [--noview] \     # Do not visualize window.
            [--outpath] \    # Recorded output directory. Dft: './spiga/demo/outputs'
            [--fps] \        # Frames per second.
            [--shape] \      # Visualizer shape (W,H).
```

### Code Structure
The demo framework has been organised according to the following structure:

```
./spiga/demo/
| app.py                            # Video-demo
|
└───analyze                                  
│   | analyzer.py                   # Generic video/image analyzer compositor
│   │
│   └───features                    # Object/Faces classes
│   │
│   └───track                       # Task heads 
│   |   | tracker.py                # Tracker class         
│   |   | get_tracker.py            # Get model tracker from zoo by name
│   |   └─── retinasort             # RetinaFace + SORT tracker (tracker + zoo files)
|   |
|   └───extract
|       | processor.py              # Processor classes
|       └ spiga_processor.py        # SPIGA wrapper
|   
└───visualize
|   | viewer.py                     # Viewer manager
|   | plotter.py                    # Englobe available features drawers
|   └─── layouts                    # Landmarks, bbox, headpose drawers
|
└───utils                           # Video converters
```