# BiasBench Dataset

BiasBench is a large-scale dataset collection consisting of three sub-datasets capturing event-based data under various hardware bias configurations for the Prophesee EVK4 Camera. Each sub-dataset contains training and validation sets, organized into subgroups based on `bias_diff_on` and `bias_diff_off` thresholds.

---

## Dataset Structure
```
files/
├── led/
│   ├── data_set/
│   │   ├── group_0_0/
│   │   ├── ...
│   │   └── group_5_5/
│   └── validation_set/
│       ├── group_0_0/
│       ├── ...
│       └── group_5_5/
│
├── robot_arm/
│   ├── left_right/
│   │   ├── group_0_0/
│   │   ├── ...
│   │   └── group_2_2/
│   └── triangle/
│       ├── group_0_0/
│       ├── ...
│       └── group_2_2/
│
└── spinning_dot/
    ├── black_dot/
    │   ├── group_0_0/
    │   ├── ...
    │   └── group_8_8/
    └── grey_dot/
        ├── group_0_0/
        ├── ...
        └── group_8_8/
```


---

## Bias Configurations

Each sub-dataset explores a range of bias values affecting event generation:

### LED
- `bias_diff_on`: 120, 100, 80, 60, 40, 20, 0, -20, -40, -60, -80
- `bias_diff_off`: 170, 150, 130, 110, 90, 70, 50, 30, 10, -10, -30
- `bias_fo`: 48, 37, 26, 15, 4, -7, -18, -29  
- `bias_hpf`: 116, 100, 84, 68, 52, 36, 20, 4  
- `bias_refr`: 225, 145, 65, -15  

### Robot Arm
- `bias_diff_on`: 140, 126 112, 99 ,85, 72, 58, 45, 31, 17, 4, -9, -22 -36, -50
- `bias_diff_off`: 190, 175, 161, 147, 132, 118, 104, 90, 75, 61, 47, 32, 18, 4, -10 
- `bias_fo`: 55, 33, 12, -8, -30  
- `bias_hpf`: 120, 96, 72, 48, 24, 0  
- `bias_refr`: 0  

### Spinning Dot
- `bias_diff_on`: 140, 130, 120, 110, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, -10, -20, -30
- `bias_diff_off`: 190, 178, 166, 154, 142, 131, 119, 107, 94, 84, 72, 60, 48, 37, 25, 13, 1, -10
- `bias_fo`: 55, 32, 10, -12, -35  
- `bias_hpf`: 120, 96, 72, 48, 24, 0  
- `bias_refr`: 200, 126, 53, -20  

---

##  File Counts & Sizes

### LED

| Group # | bias_diff_on     | bias_diff_off         | # Files |
|---------|------------------|------------------------|---------|
| 0       | 120, 100         | 170, 150               | 1024    |
| 1       | 80, 60           | 130, 110               | 1024    |
| 2       | 40, 20           | 90, 70                 | 1024    |
| 3       | 0, -20           | 50, 30                 | 1024    |
| 4       | -40, -60         | 10, -10                | 1024    |

**Edge regions:**

| Group # | bias_diff_on            | bias_diff_off              | # Files |
|---------|-------------------------|-----------------------------|---------|
| 0_5     | 120, 100, 80, 60        | -30                         | 1024    |
| 1_5     | 40, 20, 0, -20          | -30                         | 1024    |
| 5_0     | -80                     | 170, 150, 130, 110          | 1024    |
| 5_1     | -80                     | 90, 70, 50, 30              | 1024    |
| 5_5     | -40, -60                | -30                         | 1024    |
| 5_5     | -80                     | 10, -10, -30                | 1280    |

- **data_set**: 30,976 files (≈ 5.6 TB)  
- **validation_set**: 30,976 files (≈ 4.8 TB)

---

### Robot Arm

| Group # | bias_diff_on            | bias_diff_off              | # Files |
|---------|-------------------------|-----------------------------|---------|
| 0       | 140, 126, 112, 99, 85   | 190, 175, 161, 147, 132     | 750     |
| 1       | 72, 58, 45, 31, 17      | 118, 104, 90, 75, 61        | 750     |
| 2       | 4, -9, -22, -36, -50    | 47, 32, 18, 4, -10          | 750     |

- **left_right**: 6,750 files (≈ 830 GB)  
- **triangle**: 6,750 files (≈ 714 GB)

---

### Spinning Dot

| Group # | bias_diff_on     | bias_diff_off         | # Files |
|---------|------------------|------------------------|---------|
| 0       | 140, 130         | 190, 178               | 480     |
| 1       | 120, 110         | 166, 154               | 480     |
| 2       | 100, 90          | 142, 131               | 480     |
| 3       | 80, 70           | 119, 107               | 480     |
| 4       | 60, 50           | 94, 84                 | 480     |
| 5       | 40, 30           | 72, 60                 | 480     |
| 6       | 20, 10           | 48, 37                 | 480     |
| 7       | 0, -10           | 25, 13                 | 480     |
| 8       | -20, -30         | 1, -10                 | 480     |

- **black_dot**: 38,880 files (≈ 380 GB)  
- **grey_dot**: 38,880 files (≈ 821 GB)

---

## Internal File Sturcture

Each recording is saved as an HDF5 file with the following structure:


### File Format:
`bias_diff_on` _ `bias_diff_off` _ `bias_fo` _ `bias_hpf` _ `bias_refr` .h5

### File Contents (HDF5 Tree)
```
<file>.h5
├── events/
│   ├── x       # x-coordinates of events
│   ├── y       # y-coordinates of events
│   ├── p       # polarities of events
│   └── t       # timestamps of events
├── ms_to_idx   # index mapping: first event after x milliseconds
├── bias        # list of 5 bias values
└── attributes
    ├── width   # width of the recording (e.g., 1280)
    ├── height  # height of the recording (e.g., 720)
    └── sensor  # sensor model used (e.g., IMX636)
```
### Descriptions
`events/x, y, p, t`: Arrays of equal length containing the event stream data. May be empty if no events were generated.

`ms_to_idx`: A lookup table where ms_to_idx[x] gives the index of the first event with t[i] ≥ x.

`bias`: A list of five integers indicating the biases used for this recording, in the same order as encoded in the filename: `bias_diff_on`, `bias_diff_off`, `bias_fo`, `bias_hpf`, `bias_refr`

HDF5 attributes:

`width`: Width of the sensor image (e.g., 1280)

`height`: Height of the sensor image (e.g., 720)

`sensor`: String name of the sensor used (e.g., IMX636)


## Download Instructions

Due to the dataset's size (≈13.2 TB), it is distributed via a **torrent file**, allowing selective download of specific sub-datasets or bias configurations.

### Steps to Download:

1. **Download the torrent file:**  
   Get the `.torrent` file from the biasbench-2025 folder.

2. **Open the torrent file in a torrent client**  

3. **Select the data you need:**  
   - When prompted, choose only the folders of interest (e.g., `robot_arm/left_right/group_1_0/`).
   - This is useful if you want to download only a specific:
     - Bias configuration range
     - Dataset split (e.g., training vs. validation)
     - Subgroup or scene type

4. **Start the download**  
   The client will only fetch the selected files, reducing the required bandwidth and storage.

---

##  Contact

For questions, bug reports, or collaboration inquiries, please contact **[Your Name or Organization]** at **[your.email@example.com]**.

---

##  License

Include license information here (e.g., CC BY 4.0)

If you use our dataset, please cite with:

```
@INPROCEEDINGS{ziegler2025biasbenchreproduciblebenchmarktuning,
      title={BiasBench: A reproducible benchmark for tuning the biases of event cameras}, 
      author={Andreas Ziegler and David Joseph and Thomas Gossard and Emil Moldovan and Andreas Zell},
      year={2025},
      booktitle = { 2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW) },
      publisher = {IEEE Computer Society},
}
```
---

