Help for SingularityΒΆ

πŸš€ VISWIR Container User GuideΒΆ

Welcome to the VISWIR container! This guide will help you understand how to use the container, its main features, and useful commands.


πŸ“Œ Installing and Running the ContainerΒΆ

1️⃣ Download and BuildΒΆ

To rebuild the container from the Singularity definition file:

sudo singularity build VISWIR.sif Singularity

2️⃣ Running the ContainerΒΆ

To launch the container with mounted directories:

singularity run \
    -B /path/to/results:/VISWIR/results \
    -B /path/to/logs:/VISWIR/src/logs \
    -B /path/to/config:/VISWIR/config \
    -B /path/to/data:/VISWIR/data \
    VISWIR.sif

You can pass arguments directly to the main script VISWIR_vQuasar.py:

singularity run VISWIR.sif --fast --visible ../data/vis.png --swir ../data/swir.png --out ../results/fused.png

πŸ›  FeaturesΒΆ

βœ”οΈ Ready-to-use Python environment βœ”οΈ Dynamic library installation (via install_packages_container.sh) βœ”οΈ CPU-only PyTorch version (optimized for GPU-free HPC environments) βœ”οΈ Informative welcome message displayed at startup βœ”οΈ Easy access to documentation via /VISWIR/HELP.md:

singularity exec VISWIR.sif cat /VISWIR/HELP.md

πŸ–₯ Useful CommandsΒΆ

πŸ”§ Check installed Python librariesΒΆ

singularity exec VISWIR.sif pip list

πŸ” Check PyTorch versionΒΆ

singularity exec VISWIR.sif python -c "import torch; print(torch.__version__)"

πŸ”„ Reinstall / Update Python librariesΒΆ

singularity exec VISWIR.sif /VISWIR/install_packages_container.sh

πŸ— Container StructureΒΆ

The container includes the following files:

 /VISWIR
 β”œβ”€β”€ config/                        (Configuration files)
 β”œβ”€β”€ data/                          (Input datasets)
 β”œβ”€β”€ results/                       (Processing results)
 β”œβ”€β”€ msc/                           (Funding and HPC logos)
 β”œβ”€β”€ src/                           (Main source code)
 β”‚ β”œβ”€β”€ VISWIR_vQuasar.py            # Main entry point
 β”‚ β”œβ”€β”€ logs/                        # Log files
 β”‚ β”‚
 β”‚ β”œβ”€β”€ fusion/                      # Scientific core
 β”‚ β”‚ β”œβ”€β”€ NIQE/                      # NIQE implementation
 β”‚ β”‚ β”‚ β”œβ”€β”€ *.mat                    # Matlab files for NIQE
 β”‚ β”‚ β”‚ β”œβ”€β”€ niqe.py                  # NIQE computation
 β”‚ β”‚ β”œβ”€β”€ fusion.py                  # Main fusion functions
 β”‚ β”‚ β”œβ”€β”€ functions.py               # Direct support functions
 β”‚ β”‚ β”œβ”€β”€ metrics.py                 # Metrics computation (SSIM, NIQE, etc.)
 β”‚ β”‚ β”œβ”€β”€ detection_module.py        # Detection (YOLO + F1)
 β”‚ β”‚ └── utils.py                   # Utilities (I/O, normalization, etc.)
 β”‚ β”‚
 β”‚ β”œβ”€β”€ processing/                  # Batch/SQL orchestration
 β”‚ β”‚ β”œβ”€β”€ batch_runner.py            # Batch processing
 β”‚ β”‚ β”œβ”€β”€ sql_runner.py              # SQL processing
 β”‚ β”‚ β”œβ”€β”€ task_manager.py            # Task management
 β”‚ β”‚ └── interruption.py            # Interruption handling
 β”‚ β”‚
 β”‚ β”œβ”€β”€ optimization/                # Optimization (Optuna, HPC)
 β”‚ β”‚ β”œβ”€β”€ optuna_runner.py           # Main Optuna loop
 β”‚ β”‚ β”œβ”€β”€ objective.py               # Objective functions
 β”‚ β”‚ β”œβ”€β”€ visualization.py           # Result visualization
 β”‚ β”‚ └── samplers.py                # Sampler/pruner configuration
 β”‚ β”‚
 β”‚ β”œβ”€β”€ realtime/
 β”‚ β”‚ β”œβ”€β”€ fast_fusion_runner.py      # Fast pipeline
 β”‚ β”‚ β”œβ”€β”€ fast_config.py             # Fast configuration
 β”‚ β”‚ └── fast_detection.py          # Fast detection
 β”‚ β”‚
 β”‚ └── common/                      # Shared modules
 β”‚ β”‚ β”œβ”€β”€ logger.py                  # Centralized logging
 β”‚ β”‚ β”œβ”€β”€ ui.py                      # Terminal display
 β”‚ β”‚ β”œβ”€β”€ results_db.py              # Database connection and saving
 β”‚ β”‚ β”œβ”€β”€ config_loader.py           # YAML/JSON loader
 β”‚ β”‚ └── datatypes.py               # Dataclasses (ProcessResult, Config, etc.)
 β”‚
 β”œβ”€β”€ test/                          (Test scripts)
 β”œβ”€β”€ tools/                         (Utilities and SQL)
 β”‚
 β”œβ”€β”€ HELP.md                        (This guide)
 β”œβ”€β”€ install_packages_venv.sh       (Local installation via venv)
 β”œβ”€β”€ install_packages_container.sh  (Container installation)
 β”œβ”€β”€ LICENSE.txt                    (Project license)
 β”œβ”€β”€ README.md                      (Project overview)
 β”œβ”€β”€ requirements.txt               (List of Python dependencies)

πŸ†˜ Support and ContactΒΆ

If you encounter an issue, check:

πŸ“„ README.md: General project overview.

πŸ“– HELP_fr.md (this file but in french): Container usage guide.

πŸ“œ Logs are available in /VISWIR/src/logs in case of errors.

πŸ“¬ Need help? Contact us at: alexandre.riffard@uca.fr.