ViPTT-Net: Video pretraining of spatio-temporal model for tuberculosis type classification from chest CT scans

Hasib Zunair, Aimon Rahman, Nabeel MohammedarXiv 2021

TL;DR

Training deep learning models on 3D medical scans is often bottlenecked by a severe lack of labeled data. This paper introduces ViPTT-Net, a hybrid CNN-RNN model that overcomes this limitation by pretraining on standard human action recognition videos before fine-tuning on chest CT scans to classify tuberculosis (TB) types. This cross-domain transfer learning approach significantly boosts classification performance, especially for rare, under-represented types of tuberculosis.

What Problem Does This Paper Address?

Diagnosing the specific type of tuberculosis (e.g., Infiltrative, Focal, Miliary) from a chest CT scan is crucial because different types require different treatment paths. However, building deep learning models for 3D medical imaging tasks like CT interpretation faces two major hurdles:

  1. Computational Complexity and Information Loss: 3D volumes contain depth information. Processing them directly is computationally heavy, while breaking them into independent 2D slices discards vital spatial context along the z-axis.
  2. Data Scarcity and Class Imbalance: Labeled 3D medical datasets are small, and certain disease types are rare, leading to models that generalize poorly and ignore minority classes.

While 2D image models routinely leverage massive pretraining on datasets like ImageNet, there is no equivalent massive, standardized 3D dataset for medical imaging. The authors ask a creative question: Can we treat the sequential slices of a 3D CT scan like frames of a video, and pretrain our model on readily available human action videos?

Methods

The authors developed ViPTT-Net, a hybrid architecture designed to capture both spatial and sequential features:

  • Spatial Feature Extraction (CNN): Each 3D CT scan is resized to a uniform $70 \times 224 \times 224$ volume using Spline Interpolated Zoom (SIZ). A VGG-16 network (pretrained on ImageNet) processes each axial slice independently via a time-distributed layer, converting each slice into a 512-dimensional feature vector.
  • Temporal Aggregation (RNN): An LSTM layer with 256 units processes the sequence of 70 slice features. This preserves the structural order of the slices along the z-axis, mimicking how a video model processes frames over time.
  • Classification Head: Fully connected layers map the LSTM output to the final tuberculosis types.
Fig. 1: Schematic layout of the hybrid CNN-RNN model ViPTT-Net. Given a 3D CT scan of arbitrary size, uniform resizing is performed across all dimensions using SIZ [28]. Features are extracted from all the axial slices of the processed CT scan to output a sequence of image features using a VGG-16 model. These sequence of image features are input to an LSTM layer followed by dense layers of 1024 neurons and finally 5 with softmax activation for the multi-class classification problem.

The core novelty lies in the Pretraining Strategy. Before looking at any medical images, ViPTT-Net is trained on human action videos. To make the video data compatible with CT scans, the authors convert the RGB video frames to grayscale and resize the clips to match the 70-frame depth of the processed CT volumes. To handle the severe class imbalance in the medical dataset, they also incorporate a class-weighted cross-entropy loss function and 3D rotation-based data augmentation.

Datasets

Two distinct datasets were utilized:

  1. UCF50 (Pretraining): A standard computer vision dataset containing realistic YouTube videos of human actions. The authors used a subset of 1,366 videos across 10 randomly selected action classes (e.g., Jumping Jack, Horse Riding, Rowing).
  2. ImageCLEF Tuberculosis Type 2021 (Downstream Task): This dataset contains chest CT scans from 1,338 TB patients (917 for training/validation, 421 for testing). Each scan is labeled with one of five TB types: Infiltrative, Focal, Tuberculoma, Miliary, or Fibro-cavernous.
Fig. 2: Illustration of image sequences of a video and a CT scan from the UCF50 and ImageCLEF 2021 - TBT datasets. Both samples are resized to depth of 70.

Key Insights and Ideas

  • The "CT Scan as a Video" Analogy: The most striking insight is that the sequential relationship between adjacent anatomical slices in a 3D scan is mathematically analogous to the temporal continuity between frames in a video.
  • Transfer Learning Across Domains: Features learned from tracking macro-level human movements (like a jumping jack) can successfully transfer to tracking micro-level anatomical changes across slices in a human lung.
  • Rescuing Minority Classes: Models trained from scratch completely failed on rare classes like Tuberculoma (achieving an F1 score of 0.0). Video pretraining, combined with class-weighted loss, provided the structural representations necessary to successfully identify these rare conditions.

Key Results

The authors evaluated their approach using the Kappa score (which accounts for agreement occurring by chance) and per-class F1 scores.

  • Validation Boost: Pretraining on videos (PT) doubled the overall validation Kappa score from 0.17 (trained from scratch) to 0.35.
  • Impact of Class Weights (CW) & Augmentation (AUG): Introducing class weights dramatically improved the F1 score for the rarest class, Tuberculoma, from 0.09 to 0.37, and Fibro-cavernous from 0.48 to 0.65. Adding data augmentation pushed the Miliary F1 score up to 0.54.
Table 1: Overall Kappa score and per-class F1 score achieved by different meth- ods on the validation dataset of tuberculosis type classification. FibC denotes Fibro-cavernous. For all methods, the ViPTT-Net model is used.
  • Challenge Performance: On the final ImageCLEF 2021 test set, the complete pipeline (PT+CW+AUG) achieved a Kappa score of 0.20 and an accuracy of 42.30%, securing 2nd place overall in the competition. Notably, ViPTT-Net achieved this using only raw image data, without relying on patient metadata or lung segmentation masks.
Table 2: Overall Kappa and Accuracy score achieved by different methods on the test set by ImageCLEF 2021 Tuberculosis - TBT classification.

Limitations and Future Work

While the relative performance gains from video pretraining are substantial, the absolute Kappa scores (0.20 on the test set) highlight that automated tuberculosis type classification remains an incredibly challenging task.

The authors note a few limitations and areas for improvement:

  • Compute Constraints: Due to hardware limitations, they only pretrained on a 10-class subset of the UCF50 dataset. Pretraining on larger video datasets (like Kinetics or the full UCF100) could yield richer representations.
  • Exclusion of Metadata: The model ignored available clinical metadata (e.g., patient demographics) and automated lung masks. Integrating these multi-modal data streams is a clear next step to push accuracy higher.

Summary updated

BibTeX
@misc{zunair2021viptt,
  author = {Hasib Zunair and Aimon Rahman and Nabeel Mohammed},
  title = {{ViPTT-Net: Video pretraining of spatio-temporal model for tuberculosis type classification from chest CT scans}},
  year = {2021},
  eprint = {2105.12810},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.12810},
}
Figure