PiNS (Point-driven Nodule Segmentation) is a medical imaging toolkit designed for analysis of pulmonary nodules in computed tomography (CT) scans. The toolkit provides three core functionalities:
🎯 Automated Segmentation - Multi-algorithm nodule segmentation with clinical validation
📊 Quantitative Radiomics - 100+ standardized imaging biomarkers
🧩 3D Patch Extraction - Deep learning-ready data preparation
Model Architecture & Algorithms
Segmentation Pipeline
mermaid
1graph TB
2 A[CT Image + Coordinates]--> B[Coordinate Transformation]3 B --> C[ROI Extraction]4 C --> D{Segmentation Algorithm}5 D --> E[K-means Clustering]6 D --> F[Gaussian Mixture Model]7 D --> G[Fuzzy C-Means]8 D --> H[Otsu Thresholding]9 E --> I[Connected Components]10 F --> I
11 G --> I
12 H --> I
13 I --> J[Morphological Operations]14 J --> K[Expansion (2mm)]15 K --> L[Binary Mask Output]
Longitudinal Analysis: Change assessment over time
🤖 AI/ML Applications
Training Data Preparation: Standardized patch generation
Feature Engineering: Comprehensive radiomics features
Model Validation: Consistent preprocessing pipeline
Transfer Learning: Pre-processed medical imaging data
Technical Specifications
Docker Container Details
Base Image: Ubuntu 20.04 LTS
Size: ~1.5 GB
Python: 3.9+
Key Libraries:
SimpleITK 2.2.1+ (medical image processing)
PyRadiomics 3.1.0+ (feature extraction)
scikit-learn 1.3.0+ (machine learning algorithms)
pandas 2.0.3+ (data manipulation)
Performance Characteristics
Memory Usage: ~500MB per nodule
Processing Speed: Linear scaling with nodule count
Concurrent Processing: Multi-threading support
Storage Requirements: ~1MB per output mask
Validation & Quality Assurance
Evaluation Criteria: In the absence of voxel-level ground truth, we adopted a bounding box–supervised evaluation strategy to assess segmentation performance. Each CT volume was accompanied by annotations specifying the nodule center in world coordinates and its dimensions in millimeters, which were converted into voxel indices using the image spacing and clipped to the volume boundaries. A binary mask representing the bounding box was then constructed and used as a weak surrogate for ground truth. we extracted a patch centered on the bounding box, extending it by a fixed margin (64 voxels) to define the volume of interest (VOI). Predicted segmentation masks were cropped to the same VOI-constrained region of interest, and performance was quantified in terms of Dice similarity coefficient. Metrics were computed per lesion. This evaluation strategy enables consistent comparison of segmentation algorithms under weak supervision while acknowledging the limitations of not having voxel-level annotations.
Segmentation performance of KNN (ours PiNS), VISTA3D auto, and VISTA3D points (He et al. 2024) across different nodule size buckets. (top) Bar plots display the mean Dice similarity coefficient for each model and size category. (buttom) Boxplots show the distribution of Dice scores, with boxes representing the interquartile range, horizontal lines indicating the median, whiskers extending to 1.5× the interquartile range, and circles denoting outliers.
(a)
(b)
## Limitations & Considerations
Current Limitations
Nodule Size: Optimized for nodules 3-30mm diameter
Image Quality: Requires standard clinical CT protocols
Coordinate Accuracy: Dependent on annotation precision
Refining Focus in AI for Lung Cancer: Comparing Lesion-Centric and Chest-Region Models with Performance Insights from Internal and External Validation.
This project is released for academic and non-commercial research purposes only.
You are free to use, modify, and distribute this code under the following conditions:
✅ Academic research use permitted
✅ Modification and redistribution permitted for research
❌ Commercial use prohibited without prior written permission
For commercial licensing inquiries, please contact: tushar.ece@duke.edu