---
license: apache-2.0
base_model: Qualzz20/afv_fiber_9um
tags:
  - vesuvius-challenge
  - nnunet
  - 3d
  - fiber-segmentation
---

# AFV fibre model V2

A 3D model for detecting papyrus fibres in CT volumes and estimating their local orientation. It distinguishes horizontal (H) and vertical (V) fibre families.

The model uses a residual-encoder nnU-Net with a single grayscale CT input and additional heads for fibre centres, local affinities and direction. It continues the [AFV ~9 µm fibre model](https://huggingface.co/Qualzz20/afv_fiber_9um).

## Scan resolution

Optimized for CT sampled at **approximately 9 µm per voxel**. Training inputs use **8.64–9.6 µm** voxel spacing, including downsampled levels of finer-resolution scans. Prepare input volumes at this scale.

![CT input and vertical and horizontal fibre probabilities on two orthogonal slices of PHerc1447](assets/fibre-predictions.png)

*PHerc1447, 8.64 µm per voxel. Two central slices of the same 128³ input; colour intensity shows the predicted probability for each fibre family. Qualitative example from a training scroll.*

## Outputs

- **Fibre segmentation:** four voxelwise logits, ordered background, vertical, horizontal, intersection. Apply softmax across the four channels to obtain probabilities. The intersection channel is retained from the original architecture; its accuracy has not been established separately.
- **Direction:** three components in XYZ describing the local fibre axis. Normalize the vector before use; opposite signs represent the same orientation.
- **Auxiliary heads:** one fibre-centre channel and six local-affinity channels are also included in the checkpoint.

## Compression augmentation

Training includes **synthetic geometric compression** to expose the model to tightly packed papyrus layers. A smooth deformation along the local layer normal first narrows the spaces between layers; stronger variants also compress the material itself. The CT and fibre annotations follow the same deformation, keeping the targets aligned with the image.

![The same PHerc0175A CT region without added compression and with mild, moderate and strong geometric compression](assets/compression-augmentation.png)

*Recorded augmentation examples from the same PHerc0175A region, with a shared centre and display contrast. Compression here simulates physical compaction of the papyrus.*

## Training data

Training used regions from these 30 scrolls:

PHerc0125, PHerc0139, PHerc0172, PHerc0175A, PHerc0175B,
PHerc0191, PHerc0211, PHerc0257, PHerc0268, PHerc0306B,
PHerc0332, PHerc0343, PHerc0343P, PHerc0358, PHerc0483A,
PHerc0483B, PHerc0490A, PHerc0490B, PHerc0500P2, PHerc0800,
PHerc0813, PHerc0814, PHerc0826, PHerc0841, PHerc0846A,
PHerc0846B, PHerc1203, PHerc1218, PHerc1447 and PHercParis4.
