Skip to main content
QMSQMS
QMS
  • Welcome to your QMS
  • Quality Manual
  • Procedures
  • Records
  • Legit.Health Plus Version 1.1.0.0
    • CAPA Plan - BSI CE Mark Closeout
    • Index
    • Overview and Device Description
    • Information provided by the Manufacturer
    • Design and Manufacturing Information
      • R-TF-012-019 SOUPs
        • Aioboto3
        • Albumentations
        • Argon2-CFFI
        • Authlib
        • Boto3
        • Dependency Injector
        • Dill
        • FastAPI
        • PyTorch Grad-CAM
        • Httpx
        • NumPy
        • PyNVML
        • OpenCV
        • Pillow
        • Psutil
        • Pydantic
        • Pydantic Settings
        • PyYAML
        • Segmentation Models PyTorch
        • Starlette
        • Timm
        • PyTorch
        • TorchVision
        • Ultralytics YOLO
        • Uvicorn
      • R-TF-012-028 Software Requirement Specification
      • R-TF-012-029 Software Architecture Description
      • R-TF-012-030 Software Configuration Management Plan
      • R-TF-012-031 Product requirements specification
      • R-TF-012-037 Labeling and IFU Requirements
      • R-TF-012-040 Documentation level FDA
      • R-TF-012-041 Software Classification 62304
      • R-TF-012-043 Traceability Matrix
      • Review meetings
    • GSPR
    • Benefit-Risk Analysis and Risk Management
    • Product Verification and Validation
    • Post-Market Surveillance
  • Legit.Health Plus Version 1.1.0.1
  • Legit.Health Utilities
  • Licenses and accreditations
  • Applicable Standards and Regulations
  • Pricing
  • Public tenders
  • Legit.Health Plus Version 1.1.0.0
  • Design and Manufacturing Information
  • R-TF-012-019 SOUPs
  • TorchVision

TorchVision

General Information​

FieldValue
Package Nametorchvision
Manufacturer / VendorPyTorch Foundation / Linux Foundation (Meta AI, Google, Microsoft, Amazon, and 662+ contributors)
Software CategoryLibrary
Primary DocumentationDocumentation, GitHub, PyPI, Releases
Programming Language(s)Python, C++
LicenseBSD-3-Clause License
Deployed Version(s)>=0.15.0, >=0.19.0, >=0.21.0 (version-locked at 0.24.1)
Most Recent Available Version0.25.0
Last Review Date2026-01-27

Overview​

TorchVision is the official computer vision library for PyTorch, providing popular datasets, model architectures, and common image transformations. It is part of the PyTorch ecosystem and is maintained by the PyTorch Foundation under the Linux Foundation, with contributions from major technology organizations including Meta AI, Google, Microsoft, Amazon, and over 662 individual contributors.

Within the medical device software, torchvision is used exclusively for image preprocessing in the computer vision inference pipelines. It is integrated across multiple expert microservices for clinical sign classification and segmentation. Specifically, torchvision is used in:

  • Core expert framework (legithp-expert): Provides the foundational image preprocessing capabilities for all classification and segmentation experts
  • Segmenter base module: Image preprocessing for semantic segmentation models analyzing skin lesions and inflammatory patterns
  • Condition classifier: Full preprocessing pipeline with test-time augmentation (TTA) for skin condition classification
  • Follicular inflammatory pattern classifier: Specialized preprocessing with configurable normalization parameters for inflammatory pattern analysis

TorchVision was selected for:

  • Official PyTorch ecosystem component ensuring tight integration and compatibility
  • Industry-standard image transformation primitives optimized for deep learning workflows
  • Consistent API across transforms enabling composable preprocessing pipelines
  • Support for both PIL and tensor backends with automatic format conversion
  • Active maintenance with regular updates aligned to PyTorch releases
  • BSD-3-Clause license permitting commercial use in medical device software

Functional Requirements​

The following functional capabilities of this SOUP are relied upon by the medical device software.

Requirement IDDescriptionSource / Reference
FR-001Compose multiple image transforms into a sequential preprocessing pipelinetransforms.Compose()
FR-002Resize images to specified dimensions with optional anti-aliasingtransforms.Resize()
FR-003Convert PIL Images to PyTorch tensors with automatic scaling to [0, 1] rangetransforms.ToTensor()
FR-004Apply per-channel RGB normalization using configurable mean and standard deviationtransforms.Normalize()
FR-005Convert numpy arrays and tensors to PIL Image format for transform compatibilitytransforms.ToPILImage()
FR-006Support tensor input/output mode for GPU-accelerated preprocessingTensor backend support

Performance Requirements​

The following performance expectations are relevant to the medical device software.

Requirement IDDescriptionAcceptance Criteria
PR-001Image transforms shall complete within acceptable API latency boundsPreprocessing completes within the overall request timeout
PR-002Memory usage shall scale linearly with image dimensionsNo memory leaks during repeated preprocessing operations
PR-003Tensor operations shall maintain IEEE 754 float32 numerical precisionNo loss of precision affecting downstream model inference
PR-004Transform composition shall not introduce significant computational overheadChained transforms execute with minimal overhead vs. individual

Hardware Requirements​

The following hardware dependencies or constraints are imposed by this SOUP component.

Requirement IDDescriptionNotes / Limitations
HR-001Sufficient system memory for image pixel dataMemory requirements scale with image resolution (width x height x channels)
HR-002x86-64 or ARM64 processor architecturePre-built wheels available for common platforms
HR-003CUDA-compatible GPU for tensor backend transformsCPU transforms supported; GPU optional but improves throughput

Software Requirements​

The following software dependencies and environmental assumptions are required by this SOUP component.

Requirement IDDescriptionDependency / Version Constraints
SR-001Python runtime environmentPython >=3.10
SR-002PyTorch deep learning frameworktorch >=2.0.0 (version-matched with torchvision)
SR-003Pillow for PIL Image backend supportPillow (bundled or system library)
SR-004NumPy for array interoperabilityCompatible NumPy version for tensor conversion

Known Anomalies Assessment​

This section evaluates publicly reported issues, defects, or security vulnerabilities associated with this SOUP component and their relevance to the medical device software.

Anomaly ReferenceStatusApplicableRationaleReviewed At
CVE-2025-32434 (PyTorch torch.load RCE with weights_only=True)FixedNoCritical RCE vulnerability (CVSS 9.3) affecting PyTorch <=2.5.1. While torchvision depends on PyTorch, the device does not use torchvision model loading features. The device uses version-locked PyTorch >=2.6.0 which includes the fix2026-01-27

TorchVision is actively maintained as part of the PyTorch ecosystem with a robust release cycle aligned to PyTorch versions. The project follows PyTorch's security policy and uses GitHub Security Advisories for coordinated disclosure. According to vulnerability databases, no security vulnerabilities have been reported specifically for the torchvision transforms module used by the device.

The device's usage pattern minimizes attack surface exposure:

  • Limited API surface: The device uses only the transforms module for image preprocessing; no model loading, dataset downloading, or I/O operations from torchvision are utilized
  • No untrusted input to transforms: All image data is received through authenticated API endpoints and validated before preprocessing
  • No model weight loading via torchvision: Model architectures and weights are loaded through PyTorch directly, not through torchvision.models
  • Version locking: Requirements lock files pin torchvision to version 0.24.1, ensuring reproducible and auditable deployments matched to the PyTorch version
  • Input validation: All inference inputs are validated for shape, type, and format before being passed to torchvision transforms

Risk Control Measures​

The following risk control measures are implemented to mitigate potential security and operational risks associated with this SOUP component:

  • Version locking via requirements_lock.txt ensures reproducible deployments
  • PyTorch version alignment ensures compatibility and security patch coverage
  • Input validation at API boundaries prevents malformed data from reaching transforms
  • Container isolation limits potential impact of any exploitation
  • No use of network-dependent features (model downloads, dataset fetching)

Assessment Methodology​

The following methodology was used to identify and assess known anomalies:

  • Sources consulted:

    • National Vulnerability Database (NVD) search for "torchvision"
    • GitHub Security Advisories for pytorch/vision repository
    • PyTorch security policy and disclosure process
    • PyPI package security reports
    • Snyk vulnerability database
    • CVE.org search results for PyTorch ecosystem
  • Criteria for determining applicability:

    • Vulnerability must affect deployed versions (0.15.0 - 0.24.1)
    • Vulnerability must be exploitable in the device's operational context (image preprocessing only)
    • Vulnerability must impact the specific torchvision functions used (transforms module)
    • Attack vector must be reachable through the device's interfaces

Signature meaning

The signatures for the approval process of this document can be found in the verified commits at the repository for the QMS. As a reference, the team members who are expected to participate in this document and their roles in the approval process, as defined in Annex I Responsibility Matrix of the GP-001, are:

  • Author: Team members involved
  • Reviewer: JD-003, JD-004
  • Approver: JD-001
Previous
PyTorch
Next
Ultralytics YOLO
  • General Information
  • Overview
  • Functional Requirements
  • Performance Requirements
  • Hardware Requirements
  • Software Requirements
  • Known Anomalies Assessment
    • Risk Control Measures
    • Assessment Methodology
All the information contained in this QMS is confidential. The recipient agrees not to transmit or reproduce the information, neither by himself nor by third parties, through whichever means, without obtaining the prior written permission of Legit.Health (AI Labs Group S.L.)