# Remove Processed Directory

**Task**: AZ-168_refactor_remove_processed_dir
**Name**: Remove processed directory — use data dir directly
**Description**: Eliminate processed_dir concept from Config and all consumers; read from data dir directly; update e2e test fixture
**Complexity**: 3 points
**Dependencies**: AZ-167_refactor_builtin_augmentation
**Component**: Training Pipeline, Data Utilities
**Tracker**: AZ-168
**Epic**: AZ-164

## Problem

`Config` exposes `processed_dir`, `processed_images_dir`, `processed_labels_dir` properties. Multiple files read from the processed directory: `train.py::form_dataset()`, `exports.py::form_data_sample()`, `dataset-visualiser.py::visualise_processed_folder()`. With built-in augmentation, the processed directory is no longer populated.

The e2e test fixture (`tests/test_training_e2e.py`) currently copies images to both `data_images_dir` and `processed_images_dir` as a workaround — this needs cleanup once `form_dataset()` reads from data dirs.

## Outcome

- `Config` no longer has `processed_dir`/`processed_images_dir`/`processed_labels_dir` properties
- `form_dataset()` reads images/labels from `data_images_dir`/`data_labels_dir`
- `form_data_sample()` reads from `data_images_dir`
- `visualise_processed_folder()` reads from `data_images_dir`/`data_labels_dir`
- E2e test fixture copies images only to `data_images_dir`/`data_labels_dir` (no more processed dir population)

## Scope

### Included
- Remove `processed_dir`, `processed_images_dir`, `processed_labels_dir` from `Config`
- Update `form_dataset()` in `train.py` to use `data_images_dir` and `data_labels_dir`
- Update `copy_annotations()` in `train.py` to look up labels from `data_labels_dir` instead of `processed_labels_dir`
- Update `form_data_sample()` in `exports.py` to use `data_images_dir`
- Update `visualise_processed_folder()` in `dataset-visualiser.py`
- Update `tests/test_training_e2e.py` e2e fixture: remove processed dir population (only copy to data dirs)

### Excluded
- Removing `augmentation.py` file
- Changing `corrupted_dir` handling

## Acceptance Criteria

**AC-1: No processed dir in Config**
Given the `Config` class
When inspecting its properties
Then `processed_dir`, `processed_images_dir`, `processed_labels_dir` do not exist

**AC-2: Dataset formation reads data dir**
Given images and labels in `data_images_dir` / `data_labels_dir`
When `form_dataset()` runs
Then it reads from `data_images_dir` and validates labels from `data_labels_dir`

**AC-3: Data sample reads data dir**
Given images in `data_images_dir`
When `form_data_sample()` runs
Then it reads from `data_images_dir`

**AC-4: E2e test uses data dirs only**
Given the e2e test fixture
When setting up test data
Then it copies images/labels only to `data_images_dir`/`data_labels_dir` (no processed dir)
