[general]
name=Aerial LiDAR Classifier
qgisMinimumVersion=3.34
qgisMaximumVersion=3.99
description=Deep-learning semantic segmentation of aerial LiDAR point clouds with a 3D SegFormer model (TreeAIBox / NRCan).
version=1.0.2
author=Abderrazzaq Kharroubi (GeoScITY Lab, University of Liege)
email=akharroubi2@gmail.com
license=GPL-3.0-or-later

about=Classifies aerial LiDAR point clouds (LAS / LAZ / COPC) into
    Ground, Vegetation, Building, Wires / Powerlines and Poles
    (standard ASPRS codes) using the UrbanFiltering 3D SegFormer
    model from NRCan's TreeAIBox project. Runs on NVIDIA GPU (CUDA),
    Apple Silicon (MPS) or CPU; spatial tiling handles files larger
    than RAM. A one-click installer sets up an isolated Python venv
    on first use, with no impact on QGIS's own Python. The model is
    distributed under CC BY-NC 4.0; full documentation, the GPU
    driver table and the CLI / Processing usage are on the project
    homepage: https://github.com/akharroubi/AerialLidarClassifier

tracker=https://github.com/akharroubi/AerialLidarClassifier/issues
repository=https://github.com/akharroubi/AerialLidarClassifier
homepage=https://github.com/akharroubi/AerialLidarClassifier

tags=lidar,point cloud,classification,semantic segmentation,deep learning,segformer,machine learning,pytorch,asprs,las,laz,copc,aerial,treeaibox

category=Analysis
icon=icon.png

experimental=True
deprecated=False
hasProcessingProvider=yes
server=False

changelog=
    1.0.2
        - Fix: Linux install failed at the venv pre-flight check with
          "error while loading shared libraries: libpython3.12.so.1.0:
          cannot open shared object file" on every distro that uses
          python-build-standalone (i.e. all of them). The
          `python -m venv --copies` flag copies the standalone python3
          binary into venv/bin/ but does NOT copy the libpython next
          to it (venv has no notion that python-build-standalone
          ships libpython as a separate file). After the copy, the
          binary's RPATH=$ORIGIN/../lib resolves to an empty
          venv/lib/ and every invocation dies. `--copies` was added
          to dodge Windows AV quarantine of the redirector launcher.
          It is now applied only on Windows; Linux and macOS use
          symlinks (the default), which point back at the standalone
          tree so the RPATH lookup still finds libpython.
        - Fix: "Use GPU" checkbox stayed unchecked across QGIS sessions
          after a fresh install. The dock's closeEvent persisted the
          checkbox state even when the GPU probe had forced it off
          (torch not yet importable, or CUDA wheel/driver mismatch
          during the cu128 -> cu118 cascade). The False stuck and left
          users silently on CPU on the next launch. The plugin now
          only persists the GPU preference when the user could
          actually choose it (i.e. the checkbox is enabled), and a
          one-time settings migration resets the stale False on first
          launch so existing v1.0.1 users get GPU back automatically.
        - Fix: streaming I/O no longer silently drops the trailing
          partial chunk on very large LAS files. v1.0.1 skipped the
          last few thousand points whenever laspy hit
          "buffer size must be a multiple of element size" at EOF.
          The chunk loop now uses read_points(n) directly and falls
          back to a raw-byte recovery path that decodes every
          whole-point-record left on disk, so the streaming output
          has the same point count as the input.
        - Polish: trimmed the long About text in the QGIS Plugin
          Manager so the rating widget is visible without scrolling.
    1.0.1
        - Fix: corporate SSL inspection blocking the install. uv now
          uses the OS native TLS (--native-tls) so Windows-installed
          corporate CAs are trusted, and download.pytorch.org is in
          the allow-insecure-host list alongside pypi.org and
          files.pythonhosted.org. Same flag added to the pip code path
          via --trusted-host.
        - Fix: Linux first-install failed at ensurepip step because
          python-build-standalone Linux tarballs do not ship the
          bundled pip wheel. The venv is now created with --without-pip
          (we use uv for all package installs anyway).
        - Fix: CUDA wheel selection now cascades through cu128 -> cu126
          -> cu124 -> cu121 -> cu118 instead of giving up at the first
          driver-version miss. Recovers GPU acceleration for NVIDIA
          drivers older than 550.
        - Fix: cap torch version per cuda index (cu118/cu121 -> torch
          <2.6, cu124 -> torch <2.8) so uv no longer picks the latest
          +cpu wheel from the cuda index instead of the latest +cuXXX.
        - Add: install marker recording the plugin version that built
          the venv. On version mismatch the Setup dock reopens with a
          one-click Reinstall that wipes the stale venv automatically.
        - Add: classification-coloured 3D renderer auto-attached to
          loaded layers so the 3D Map View renders points in 3D out of
          the box.
    1.0.0
        - Initial public release on the QGIS plugin repository
        - 3D SegFormer (UrbanFiltering, TreeAIBox / NRCan) integration
        - QGIS Processing algorithm + provider (Toolbox, Modeler, qgis_process CLI)
        - Isolated per-user venv dependency installer (PyTorch CPU /
          CUDA 12.1 / 12.4 / 12.6 / 12.8), compute-capability- and
          driver-version-aware wheel selection
        - Background QgsTask with progress and cancellation
        - LAS / LAZ / COPC input; LAS or LAZ output (matches input)
        - Spatial tiling and streaming I/O for files larger than RAM
        - Optional automatic loading of results as point-cloud layers
        - SHA-256 verification of downloaded model weights
        - Network calls go through QgsBlockingNetworkRequest (proxy /
          auth / certificates honoured per QGIS plugin guidelines)
