File size: 839 Bytes
e33e288
 
 
c7138a3
e33e288
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Crop parameters

One square crop box per clip that frames the signer, found by running a YOLO person detector on every frame
(code: [pjm-data, step 05](https://github.com/crocosign/pjm-data/tree/main/dataset-processing/05_crop_params)). The videos are stored uncropped; the crop is
applied when loading data.

- `crop_params.lmdb/`: LMDB with the clip key (the `__key__` of the segment record) as key and a msgpack map as
  value: `x_start`, `y_start`, `x_end`, `y_end` and `padding` (`top`, `bottom`, `left`, `right`). It covers all
  39,813 segments, before the dataset filters.
- `failed.csv`: the 4 clips that could not be opened (`video_name`, `exception`).

```python
import lmdb, msgpack

env = lmdb.open("crop_params.lmdb", readonly=True, lock=False)
with env.begin() as txn:
    box = msgpack.unpackb(txn.get(b"001_000_M"))
```