Skip to content
Back to skills

Tb Classification Eval

ASecurity

Evaluates deep learning models' ability to classify chest X-rays as tuberculosis or normal, comparing whole-image vs. lung-segmented inputs. Use when the user wants to benchmark on Kaggle CXR images and lung mask dataset, or asks about evaluating this task. Reports accuracy.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 11, 2026
researchpythontestingperformance

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill tb-classification-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tb Classification Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tb Classification Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-tb-classification-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-tb-classification-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tb-classification-eval
description: Evaluates deep learning models' ability to classify chest X-rays as tuberculosis or normal, comparing whole-image vs. lung-segmented inputs. Use when the user wants to benchmark on Kaggle CXR images and lung mask dataset, or asks about evaluating this task. Reports accuracy.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2007.14895
  bibtex_key: [REDACTED]
  confidence: high
---

# tb-classification-eval

> Reliable Tuberculosis Detection using Chest X-ray with Deep Learning, Segmentation and Visualization — Rahman et al. (2020) (arXiv:2007.14895, 2020)

## What this evaluates

Evaluates deep learning models' ability to classify chest X-rays as tuberculosis or normal, comparing whole-image vs. lung-segmented inputs.

## Datasets

- **Kaggle CXR images and lung mask dataset** — total ?; splits: train (-1), val (-1), test (-1)

## Metrics

- `accuracy` **(primary)** — range: [0, 1]
  - Accuracy = (TP + TN) / (TP + FN + FP + TN). Measures the proportion of correctly classified images.
- `sensitivity` — range: [0, 1]
  - Sensitivity = TP / (TP + FN). Also called recall; measures the proportion of actual TB cases correctly identified.
- `specificity` — range: [0, 1]
  - Specificity = TN / (FP + TN). Measures the proportion of normal cases correctly identified.
- `precision` — range: [0, 1]
  - Precision = TP / (TP + FP). Measures the proportion of predicted TB cases that are actually TB.
- `AUC` — range: [0, 1]
  - Area under the Receiver Operating Characteristic (ROC) curve. Computed by averaging five-fold cross-validation results.
- `F1 score` — range: [0, 1]
  - F1 = (2 * TP) / (2 * TP + FN + FP). Harmonic mean of precision and recall.

## Input / output format

**Input**: Chest X-ray images (either whole image or lung-segmented mask).

**Output**: Binary classification label: TB or normal.

## Scoring recipe

```python
def compute_metrics(y_true, y_pred):
    TP = sum((y_true == 1) & (y_pred == 1))
    TN = sum((y_true == 0) & (y_pred == 0))
    FP = sum((y_true == 0) & (y_pred == 1))
    FN = sum((y_true == 1) & (y_pred == 0))
    accuracy = (TP + TN) / (TP + FN + FP + TN)
    sensitivity = TP / (TP + FN)
    specificity = TN / (FP + TN)
    precision = TP / (TP + FP)
    f1 = (2 * TP) / (2 * TP + FN + FP)
    return {'accuracy': accuracy, 'sensitivity': sensitivity, 'specificity': specificity, 'precision': precision, 'f1': f1}
```

## Common pitfalls

- The paper uses five-fold cross-validation on a relatively small dataset, which can lead to high variance in metrics.
- Segmentation is performed as a separate preprocessing step; errors in lung mask generation may propagate to classification without being accounted for.
- Dataset size is ambiguously stated (704 images for segmentation vs. 4200 for classification in the brief).

## Evidence (verbatim from paper)

> The performance of different CNNs for testing dataset was evaluated after the completion of validation phase and was compared using six performance metrics: accuracy, sensitivity or recall, specificity, precision, area under curve (AUC), F1 score.

## Citation

```bibtex
@misc{rahman2020reliable,
  title={Reliable Tuberculosis Detection using Chest X-ray with Deep Learning, Segmentation and Visualization},
  author={Rahman et al. (2020)},
  year={2020},
  note={arXiv:2007.14895}
}
```

- arXiv: 2007.14895

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.