# PISC Social Relation Dataset — Assignment Edition

A preprocessed subset of the **People in Social Context (PISC)** dataset for a 3-class social relation classification task using CNNs.

Original dataset: Li et al., *Dual-Glance Model for Deciphering Social Relationships*, ICCV 2017.

---

## Task

Given a cropped image of two people, predict the social relation between them.

| Label ID | Class | Description |
|---|---|---|
| 0 | `friends` | Informal peer relationship |
| 1 | `family` | Family members |
| 2 | `professional` | Work or institutional relationship |

---

## Files

| File | Description |
|---|---|
| `pisc_64x64.zip` | All images under `images/`, JPEG 64×64 px |
| `train.csv` | Training split labels |
| `val.csv` | Validation split labels |
| `test.csv` | Test split labels |

Each CSV has three columns: `filename`, `label_id` (1-indexed, 1=friends / 2=family / 4=professional), `label_name`.

---

## Dataset Statistics

| Split | friends | family | professional | Total |
|---|---|---|---|---|
| Train | 1918 | 1713 | 2741 | **6372** |
| Val | 36 | 59 | 40 | **135** |
| Test | 100 | 125 | 102 | **327** |
| **Total** | **2054** | **1897** | **2883** | **6834** |

The training set is mildly imbalanced (`professional` ~43%), which is worth addressing with a weighted loss function.

---

## How Images Were Prepared

1. Only images with **exactly 2 annotated people** were kept (from the original ~22k images).
2. For each pair, the **union bounding box** of both persons was computed, with 10% padding on each side.
3. The crop was **resized to 64×64** pixels using Lanczos resampling.
4. Train/val/test splits follow the official PISC split (`relationship_split.zip`).
5. Classes `couple`, `commercial`, and `no_relation` were excluded.

---

