{"id":347413,"name":"FuelDeep3D","description":"Provides tools for processing, feature extraction, and classification of 3D forest point clouds for fuel assessment application.","url":"https://github.com/venkatasivanaga/fueldeep3d","last_synced_at":"2026-04-17T19:30:55.914Z","repository":{"id":324122590,"uuid":"1095996576","full_name":"venkatasivanaga/FuelDeep3D","owner":"venkatasivanaga","description":"R package for LiDAR point-cloud processing and deep-learning inference for 3D fuel mapping.","archived":false,"fork":false,"pushed_at":"2026-03-04T22:17:50.000Z","size":131226,"stargazers_count":20,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-30T12:30:23.387Z","etag":null,"topics":["deep-learning","forestry","fuels","geospatial","lidar","lidr","point-cloud","pytorch","r","remote-sensing","reticulate","rgl","segmentation"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/venkatasivanaga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-13T19:53:06.000Z","updated_at":"2026-03-20T22:22:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"f4f54c29-8116-4a42-9c81-50e4086847e8","html_url":"https://github.com/venkatasivanaga/FuelDeep3D","commit_stats":null,"previous_names":["venkatasivanaga/trees_seg","venkatasivanaga/fueldeep3d"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/venkatasivanaga/FuelDeep3D","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkatasivanaga%2FFuelDeep3D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkatasivanaga%2FFuelDeep3D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkatasivanaga%2FFuelDeep3D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkatasivanaga%2FFuelDeep3D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/venkatasivanaga","download_url":"https://codeload.github.com/venkatasivanaga/FuelDeep3D/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkatasivanaga%2FFuelDeep3D/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31355674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T08:03:20.796Z","status":"ssl_error","status_checked_at":"2026-04-03T08:00:37.834Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"venkatasivanaga","name":null,"uuid":"187085315","kind":"user","description":null,"email":"","website":null,"location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/187085315?v=4","repositories_count":1,"last_synced_at":"2025-10-20T07:30:11.787Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/venkatasivanaga","funding_links":[],"total_stars":0,"followers":0,"following":0,"created_at":"2025-10-20T07:30:11.858Z","updated_at":"2025-10-20T07:30:11.858Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/venkatasivanaga","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/venkatasivanaga/repositories"},"packages":[{"id":13959397,"name":"FuelDeep3D","ecosystem":"cran","description":"3D Fuel Segmentation Using Terrestrial Laser Scanning and Deep\nLearning","homepage":"https://github.com/venkatasivanaga/FuelDeep3D","licenses":"GPL (≥ 3)","normalized_licenses":["CNRI-Python-GPL-Compatible"],"repository_url":"https://github.com/venkatasivanaga/FuelDeep3D","keywords_array":[],"namespace":null,"versions_count":1,"first_release_published_at":"2026-03-02T00:00:00.000Z","latest_release_published_at":"2026-03-02T00:00:00.000Z","latest_release_number":"0.1.1","last_synced_at":"2026-04-13T18:01:04.028Z","created_at":"2026-03-02T21:41:58.852Z","updated_at":"2026-04-13T18:05:06.466Z","registry_url":"https://cran.r-project.org/package=FuelDeep3D","install_command":null,"documentation_url":"http://cran.r-project.org/web/packages/FuelDeep3D/FuelDeep3D.pdf","metadata":{},"repo_metadata":{"id":324122590,"uuid":"1095996576","full_name":"venkatasivanaga/FuelDeep3D","owner":"venkatasivanaga","description":"R package for LiDAR point-cloud processing and deep-learning inference for 3D fuel mapping.","archived":false,"fork":false,"pushed_at":"2026-03-04T22:17:50.000Z","size":131226,"stargazers_count":20,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-21T21:38:07.742Z","etag":null,"topics":["deep-learning","forestry","fuels","geospatial","lidar","lidr","point-cloud","pytorch","r","remote-sensing","reticulate","rgl","segmentation"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/venkatasivanaga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-13T19:53:06.000Z","updated_at":"2026-03-20T22:22:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"f4f54c29-8116-4a42-9c81-50e4086847e8","html_url":"https://github.com/venkatasivanaga/FuelDeep3D","commit_stats":null,"previous_names":["venkatasivanaga/trees_seg","venkatasivanaga/fueldeep3d"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/venkatasivanaga/FuelDeep3D","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkatasivanaga%2FFuelDeep3D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkatasivanaga%2FFuelDeep3D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkatasivanaga%2FFuelDeep3D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkatasivanaga%2FFuelDeep3D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/venkatasivanaga","download_url":"https://codeload.github.com/venkatasivanaga/FuelDeep3D/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkatasivanaga%2FFuelDeep3D/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30958737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-26T09:59:11.643Z","status":"ssl_error","status_checked_at":"2026-03-26T09:58:43.930Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"},"owner_record":{"login":"venkatasivanaga","name":null,"uuid":"187085315","kind":"user","description":null,"email":"","website":null,"location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/187085315?v=4","repositories_count":1,"last_synced_at":"2025-10-20T07:30:11.787Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/venkatasivanaga","funding_links":[],"total_stars":0,"followers":0,"following":0,"created_at":"2025-10-20T07:30:11.858Z","updated_at":"2025-10-20T07:30:11.858Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/venkatasivanaga","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/venkatasivanaga/repositories"},"tags":[{"name":"v0.1.0","sha":"c5f4ac6fdd7f7839057d95bf5a21a235413b6845","kind":"commit","published_at":"2026-02-11T18:06:10.000Z","download_url":"https://codeload.github.com/venkatasivanaga/FuelDeep3D/tar.gz/v0.1.0","html_url":"https://github.com/venkatasivanaga/FuelDeep3D/releases/tag/v0.1.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/venkatasivanaga/FuelDeep3D@v0.1.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkatasivanaga%2FFuelDeep3D/tags/v0.1.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkatasivanaga%2FFuelDeep3D/tags/v0.1.0/manifests"}]},"repo_metadata_updated_at":"2026-04-13T18:05:06.465Z","dependent_packages_count":0,"downloads":473,"downloads_period":"last-month","dependent_repos_count":0,"rankings":{"downloads":85.68464730290457,"dependent_repos_count":30.08153756552126,"dependent_packages_count":24.421228887594644,"stargazers_count":null,"forks_count":null,"docker_downloads_count":null,"average":46.729137918673494},"purl":"pkg:cran/FuelDeep3D","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/cran/FuelDeep3D","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/cran/FuelDeep3D","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/cran/FuelDeep3D/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":null,"versions_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/FuelDeep3D/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/FuelDeep3D/version_numbers","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/FuelDeep3D/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/FuelDeep3D/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/FuelDeep3D/codemeta","maintainers":[{"uuid":"venkatasivareddy003@gmail.com","login":null,"name":"Venkata Siva Reddy Naga","email":"venkatasivareddy003@gmail.com","url":null,"packages_count":1,"html_url":null,"role":null,"created_at":"2026-03-02T21:42:01.870Z","updated_at":"2026-03-02T21:42:01.870Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/maintainers/venkatasivareddy003@gmail.com/packages"}],"registry":{"name":"cran.r-project.org","url":"https://cran.r-project.org","ecosystem":"cran","default":true,"packages_count":27983,"maintainers_count":15518,"namespaces_count":0,"keywords_count":0,"github":"r-project-org","metadata":{"icon_url":"https://cran.r-project.org/CRANlogo.png","funded_packages_count":546},"icon_url":"https://cran.r-project.org/CRANlogo.png","created_at":"2022-04-06T16:32:25.637Z","updated_at":"2026-04-03T06:40:33.945Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages","maintainers_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/maintainers","namespaces_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/namespaces"}}],"commits":{"id":11660508,"full_name":"venkatasivanaga/fueldeep3d","default_branch":"master","total_commits":144,"total_committers":2,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":72.0,"dds":0.04861111111111116,"past_year_total_commits":144,"past_year_total_committers":2,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":72.0,"past_year_dds":0.04861111111111116,"last_synced_at":"2026-04-13T12:39:32.803Z","last_synced_commit":"98f29d11f572b1f1e53d1fde1aca604ed78bba11","created_at":"2026-03-08T01:00:43.606Z","updated_at":"2026-04-13T12:39:32.779Z","committers":[{"name":"Naga","email":"vs.naga@ufl.edu","login":"venkatasivanaga","count":137},{"name":"alexandergaskins","email":"alexandergaskins@ufl.edu","login":"alexandergaskins","count":7}],"past_year_committers":[{"name":"Naga","email":"vs.naga@ufl.edu","login":"venkatasivanaga","count":137},{"name":"alexandergaskins","email":"alexandergaskins@ufl.edu","login":"alexandergaskins","count":7}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkatasivanaga%2Ffueldeep3d/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-13T00:00:06.408Z","repositories_count":6212945,"commits_count":903831244,"contributors_count":34932484,"owners_count":1144091,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":null,"events":{"total":{"MemberEvent":1,"ForkEvent":2,"WatchEvent":5,"PushEvent":45},"last_year":{"MemberEvent":1,"ForkEvent":2,"WatchEvent":5,"PushEvent":45}},"keywords":["deep-learning","forestry","fuels","geospatial","lidar","lidr","point-cloud","pytorch","r","remote-sensing","reticulate","rgl","segmentation"],"dependencies":[],"score":9.850086775809013,"created_at":"2026-03-06T00:14:04.383Z","updated_at":"2026-04-17T19:30:55.924Z","avatar_url":"https://github.com/venkatasivanaga.png","language":"R","category":"Biosphere","sub_category":"Forest Remote Sensing","monthly_downloads":473,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"inst/readme/banner.png\" alt=\"Single tree segmentation output\" width=\"100%\"\u003e\r\n\u003c/p\u003e\r\n\r\n\u003c!-- This is a comment. [![R-hub](https://github.com/venkatasivanaga/FuelDeep3D/.github/workflows/r.yml/badge.svg)](https://github.com/venkatasivanaga/FuelDeep3D/actions/workflows/rhub.yaml)  --\u003e \r\n\r\n[![R-CMD-check](https://github.com/venkatasivanaga/FuelDeep3D/actions/workflows/r.yml/badge.svg?branch=main)](https://github.com/venkatasivanaga/FuelDeep3D/actions/workflows/r.yml)\r\n[![CRAN](https://www.r-pkg.org/badges/version/FuelDeep3D)](https://cran.r-project.org/package=FuelDeep3D)\r\n![GitHub](https://img.shields.io/badge/GitHub-0.1.0-green.svg)\r\n![licence](https://img.shields.io/badge/Licence-GPL--3-blue.svg)\r\n![Downloads](https://cranlogs.r-pkg.org/badges/grand-total/FuelDeep3D)\r\n[![Build Status](https://app.travis-ci.com/venkatasivanaga/FuelDeep3D.svg?branch=main)](https://app.travis-ci.com/venkatasivanaga/FuelDeep3D)\r\n\r\n\u003c!-- This is a comment. [![FuelDeep3D statusbadge](https://venkatasivanaga.dev/badges/FuelDeep3D)](https://venkatasivanaga.r-universe.dev/FuelDeep3D)  --\u003e \r\n\r\n# FuelDeep3D: An R package for Fire Fuels Segmentation in 3D Using Terrestrial Laser Scanning and Deep Learning  \r\n\r\n**Authors:** Venkata Siva Reddy Naga, Alexander John Gaskins, and Carlos Alberto Silva.\r\n\r\n\r\n`FuelDeep3D` provides tools for processing, feature extraction, and classification of 3D forest point clouds for fuel assessment applications. \r\nThe package supports creating training datasets, computing height-derived metrics, segmenting vegetation structures, and writing per-point fuel \r\nclasses back to LAS/LAZ files. These functions streamline TLS-based fuel mapping workflows and enable integration with forest inventory, \r\nwildfire modeling, and ecological analysis pipelines in R.  \r\n\r\nThe package enables users to move efficiently from raw .las files to classified fuel layers, supporting applications in forest structure assessment, wildfire behavior modeling, and fuel complexity analysis.\r\n\r\nFuelDeep3D offers tools to:\r\n\r\n- Build structured training datasets from labeled point clouds\r\n- Compute height-derived features such as height-above-ground (HAG)\r\n- Tile, sample, and preprocess large TLS scenes for efficient modeling\r\n- Apply trained models to new .las files and write predictions back to disk\r\n- Enable users to train their own deep learning models on custom labeled datasets\r\n- Perform visualization, quality control, and evaluation of predicted fuel classes\r\n\r\n\r\n---\r\n\r\n## 1. Getting Started\r\n\r\n### 1.1 Installation of the FuelDeep3D package\r\n\r\n\r\n```r\r\ninstall.packages('FuelDeep3D')\r\n\r\n# or use below command\r\n\r\ninstall.packages(\r\n  \"FuelDeep3D\",\r\n  repos = c(\"https://venkatasivanaga.r-universe.dev/FuelDeep3D\",\r\n            \"https://cloud.r-project.org\")\r\n)\r\n\r\nlibrary(FuelDeep3D)\r\n\r\n```\r\n\r\n---\r\n\r\n### 1.1.1 Manual installation using Anaconda/Miniconda (Only if not already installed)\r\n\r\n**i) Download**\r\n\r\n- Anaconda (full distribution, includes many packages):  \r\n  \u003chttps://www.anaconda.com/download\u003e\r\n\r\nOR\r\n  \r\n- Miniconda (lightweight, only Conda + Python):  \r\n  \u003chttps://docs.conda.io/en/latest/miniconda.html\u003e\r\n\r\n**ii) Install**\r\n\r\n1. Download the Windows installer (**64-bit**) for Python 3.x.\r\n2. Run the installer:\r\n   - Accept the license.\r\n   - Choose **“Just Me”** (recommended) unless you know you need “All Users”.\r\n   - Keep the default install location (e.g., `C:\\Users\\\u003cyou\u003e\\anaconda3`).\r\n   - *Optional but convenient:* check **“Add Anaconda to my PATH”** if you want\r\n     to use `conda` from a normal Command Prompt.\r\n3. Click **Next - Install** and wait for the installation to finish.\r\n4. Open **Anaconda Prompt** from the Start menu and run:\r\n\r\n   ```bash\r\n   conda --version\r\n\r\n### 1.1.2 Create the `pointnext` Conda environment \r\n\r\nYou can create the Python environment directly from R using **reticulate** and install all Python dependencies.\r\n\r\n```r\r\n# 0) Install FuelDeep3D and reticulate if not already\r\ninstall.packages(\"FuelDeep3D\")    # from r-universe or other repo\r\ninstall.packages(\"reticulate\")\r\n\r\nlibrary(FuelDeep3D)\r\nlibrary(reticulate)\r\n\r\n# 1) Create or reuse the \"pointnext\" env and install deps if needed\r\nensure_py_env(envname = \"pointnext\", reinstall = TRUE, cpu_only = FALSE)   # creates env + installs deps the first time\r\n# Use \"reinstall = TRUE\" to force-reinstall.\r\n# ensure_py_env(envname = \"pointnext\", reinstall = TRUE, cpu_only = TRUE) # Installs only cpu dependencies\r\n\r\n# 2) Sanity check – should show Python from the \"pointnext\" env\r\npy_config()\r\n\r\n```\r\n\r\n\u003e **Note (Troubleshooting):** If you run into any Conda/reticulate issues while creating or activating the `pointnext` environment (e.g., R picks the wrong Python, `py_config()` shows an unexpected interpreter, or you see missing-module/DLL errors), refer to the **[Conda + R (reticulate) Troubleshooting Guide](inst/readme/conda_reticulate_troubleshooting.md)** for step-by-step diagnostics and fixes.\r\n\r\n---\r\n\r\n## 2. Visualization of a 3D point cloud\r\n\r\n`FuelDeep3D` integrates smoothly with the **lidR** package, enabling users to quickly explore\r\nLiDAR scenes, height structures, and model-predicted segmentations.  \r\nThis section provides simple commands to visualize `.las` / `.laz` files during your workflow.\r\n\r\n---\r\n\r\n### 2.1 Visualize LiDAR data by Height (Z)\r\n\r\nThis visualization shows the unclassified LiDAR point cloudwith points colored by height (Z value).\r\nThis height-based coloring helps reveal canopy layers, trunk structure, and differences in ground elevation.\r\n\r\n```r\r\nlibrary(lidR)\r\n\r\nlas \u003c- readLAS(system.file(\"extdata\", \"las\", \"trees.laz\",\r\n                           package = \"FuelDeep3D\"))\r\n\r\n# las \u003c- readLAS(\"path/to/your_file.laz\")\r\n\r\n# 1) Default plot (black bg, legend on, thickness by height)\r\n\r\nplot_3d(las)\r\n\r\n# 2) Custom palette + white background\r\n\r\nplot_3d(\r\n  las,\r\n  bg = \"white\",\r\n  height_palette = c(\"purple\",\"blue\",\"cyan\",\"yellow\",\"red\"),\r\n  title = \"Custom palette\"\r\n)\r\n  \r\n# 3) Fixed Z color scale for comparisons + no legend\r\n\r\nplot_3d(\r\n  las,\r\n  zlim = c(0, 40),\r\n  add_legend = FALSE,\r\n  title = \"Fixed Z (0-40), no legend\"\r\n)\r\n  \r\n# 4) Turn OFF thickness-by-height; use a single point size\r\n\r\nplot_3d(\r\n  las,\r\n  size_by_height = FALSE,\r\n  size = 4,\r\n  title = \"Uniform thicker points\"\r\n)\r\n  \r\n# 5) Legend on the LEFT and thicker legend bar\r\n\r\nplot_3d(\r\n  las,\r\n  legend_side = \"left\",\r\n  legend_width_frac = 0.05,\r\n  title = \"Legend left\"\r\n)\r\n  \r\n# 6) Make everything thicker (multiplies size_range when size_by_height=TRUE)\r\n\r\nplot_3d(\r\n  las,\r\n  size = 1.8,\r\n  size_range = c(1, 7),\r\n  size_power = 1.2,\r\n  title = \"Thicker points by height\"\r\n)\r\n\r\n```\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"inst/readme/plot_height.png\" alt=\"Raw LiDAR visualization\" width=\"85%\"\u003e\r\n\u003c/p\u003e\r\n\r\nThis view helps inspect canopy structure, terrain variation, and overall point-cloud quality.\r\n\r\n---\r\n\r\n## 3. Predict on new data using a pre-trained model\r\n\r\n```r\r\nlibrary(FuelDeep3D)\r\nlibrary(reticulate)\r\nuse_condaenv(\"pointnext\", required = TRUE)\r\n\r\ncfg \u003c- config(\r\n  las_path     = system.file(\"extdata\", \"las\", \"trees.laz\", package = \"FuelDeep3D\"),  # any LAS or LAZ you want to segment\r\n  out_pred_dir = \"output_predictions\",\r\n  model_path   = system.file(\"extdata\", \"model\", \"best_model.pth\", package = \"FuelDeep3D\"),       # your pre-trained checkpoint\r\n  num_classes = 3\r\n)\r\n\r\npredict(cfg, mode = \"overwrite\", setup_env = FALSE)\r\n# or keep original classification and add 'pred_label':\r\n# predict(cfg, mode = \"extra\", setup_env = FALSE)\r\n```\r\n\r\n## 3.1 Predicted Result\r\n\r\n### Visualizing predicted classes in R\r\n\r\nFuelDeep3D stores per-point predictions in the LAS attribute **`Classification`** (the standard LAS classification field).\r\nYou can visualize these predictions directly in R using an interactive **rgl** window with `predicted_plot3d()`.\r\nPoints are colored by any discrete field stored in `las@data` (e.g., `\"Classification\"` for predictions or `\"label\"` for original labels).\r\n\r\n\u003e Note: FuelDeep3D intentionally does **not** draw a fixed legend inside the rgl window.\r\n\u003e Instead, when `verbose = TRUE`, the function prints a clear **class → name → color** mapping in the R console.\r\n\r\n#### Predicted output (Classification)\r\n\r\n```r\r\nlibrary(lidR)\r\nlibrary(FuelDeep3D)\r\n\r\n# Read the predicted LAS/LAZ (predictions stored in las@data$Classification)\r\nlas_pred \u003c- readLAS(\"trees_predicted.las\")\r\n\r\npredicted_plot3d(\r\n  las_pred,\r\n  field = \"Classification\",\r\n  bg    = \"white\",\r\n  title = \"Predicted classes (Classification)\",\r\n  verbose = TRUE\r\n)\r\n```\r\n\r\n#### Compare raw labels vs predicted classes\r\n\r\n```r\r\nlas_raw \u003c- readLAS(\"trees.las\")\r\n\r\n# Original labels (ground truth) stored in las@data$label\r\npredicted_plot3d(las_raw, field = \"label\", bg = \"white\", title = \"Original labels\")\r\n\r\n# Predicted labels stored in las@data$Classification\r\npredicted_plot3d(las_pred, field = \"Classification\", bg = \"white\", title = \"Predicted classes\")\r\n```\r\n\r\n#### Custom colors and custom class names\r\n\r\n```r\r\nmy_cols \u003c- c(\r\n  \"0\" = \"#1F77B4\",  # blue\r\n  \"1\" = \"#8B4513\",  # brown\r\n  \"2\" = \"#228B22\"   # green\r\n)\r\n\r\nmy_labs \u003c- c(\r\n  \"0\" = \"Ground vegetation\",\r\n  \"1\" = \"Branch/Stem\",\r\n  \"2\" = \"Leaves/Foliage\"\r\n)\r\n\r\npredicted_plot3d(\r\n  las_pred,\r\n  field = \"Classification\",\r\n  class_colors = my_cols,\r\n  class_labels = my_labs,\r\n  bg = \"white\",\r\n  verbose = TRUE\r\n)\r\n```\r\n\r\n#### Downsampling (optional for large point clouds): The default setting plots every point (downsample = \"none\"). For large point clouds, use downsampling to speed up plotting and maintain responsiveness.\r\n\r\n```r\r\npredicted_plot3d(\r\n  las_pred,\r\n  field = \"Classification\",\r\n  downsample = \"voxel\",\r\n  voxel_size = 0.10,\r\n  size = 2,\r\n  bg = \"white\"\r\n)\r\n```\r\n### Important note about color names\r\n\r\nBase R does not recognize some CSS color names (for example, `lime`).  \r\nTo avoid errors, **hex codes** are recommended, though **valid base R color names** also work.\r\n\r\n```r\r\n# ✅ hex is safest\r\npredicted_plot3d(las_pred, field=\"Classification\",\r\n                  class_colors = c(\"black\",\"red\",\"#00FF00\"))\r\n\r\n# ✅ valid base R name example: \"limegreen\"\r\npredicted_plot3d(las_pred, field=\"Classification\",\r\n                  class_colors = c(\"black\",\"red\",\"limegreen\"))\r\n```\r\n\r\n![Example segmentation output](inst/readme/cover2_new.png)\r\n\r\nAn example of the vegetation segmentation applied to a labeled LAS file.\r\nEach point is colored by its predicted class (e.g., ground/understory, stem, canopy foliage).\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"inst/readme/tree.gif\" alt=\"Single tree segmentation output\" width=\"45%\"\u003e\r\n\u003c/p\u003e\r\n\r\nIn this example, the model was trained on `trees.las` and then used to predict labels for the\r\nsame scene. The output LAS (`trees_predicted.las`) stores predictions in the `Classification`\r\nfield, which can be visualized in tools like CloudCompare or QGIS using a class-based color ramp.\r\n\r\n---\r\n\r\n## 4. Pre-processing and Training\r\n\r\nPre-processing prepares raw TLS point clouds for deep learning–based fuel\r\nsegmentation. This step focuses on removing obvious outliers, standardizing\r\npoint attributes, and improving the quality of model inputs prior to tiling\r\nand feature extraction.\r\n\r\n---\r\n\r\n### 4.1 Optional noise filtering\r\n\r\nTLS point clouds may contain isolated outlier points, particularly in sparse\r\nregions of the scene. To reduce the influence of these points, FuelDeep3D\r\nprovides a utility function based on Statistical Outlier Removal (SOR).\r\n\r\nThe filtering is applied selectively to points above a user-defined height\r\nthreshold, while points below this threshold are preserved. This helps remove\r\nsparse artifacts without affecting ground or lower vegetation structure.\r\n\r\n**Parameters:**\r\n- `height_thresh`: height (in meters) above which SOR is applied\r\n- `k`: number of nearest neighbors used to estimate local point spacing\r\n- `zscore`: standard deviation multiplier controlling outlier rejection\r\n\r\n#### Example: apply noise filtering\r\n\r\n```r\r\nlibrary(FuelDeep3D)\r\nlibrary(lidR)\r\n\r\n# Load TLS point cloud\r\nlas \u003c- readLAS(system.file(\"extdata\", \"las\", \"trees.laz\",\r\n                           package = \"FuelDeep3D\"))\r\n\r\n# Apply SOR-based filtering\r\nlas_clean \u003c- remove_noise_sor(\r\n  las,\r\n  height_thresh = 5,\r\n  k = 20,\r\n  zscore = 2.5\r\n)\r\n\r\n# Inspect the filtered point cloud\r\nplot(las_clean, color = \"Z\", pal = height.colors(30), bg = \"white\")\r\n```\r\n\r\n### 4.2 Train a new model on your own labelled LAS data\r\n\r\n\r\n```r\r\nlibrary(FuelDeep3D)\r\nlibrary(reticulate)\r\nuse_condaenv(\"pointnext\", required = TRUE)\r\n\r\ncfg \u003c- config(\r\n  las_path     = system.file(\"extdata\", \"las\", \"trees.laz\", package = \"FuelDeep3D\"),\r\n  out_dir      = system.file(\"extdata\", \"npz_files\", package = \"FuelDeep3D\"),\r\n  out_pred_dir = system.file(\"extdata\", \"output_directory\", package = \"FuelDeep3D\"),\r\n  model_path   = system.file(\"extdata\", \"model\", \"best_model.pth\", package = \"FuelDeep3D\"),\r\n  epochs       = 2, batch_size = 16,\r\n  learning_rate = 1e-5, weight_decay = 1e-4,\r\n  block_size = 6, stride = 1, sample_n = 4096,\r\n  repeat_per_tile = 4, min_pts_tile = 512,\r\n  cell_size = 0.25, quantile = 0.05\r\n)\r\n\r\nres \u003c- train(cfg, setup_env = FALSE)        # trains \u0026 saves best .pth\r\npredict(cfg, mode = \"overwrite\", setup_env = FALSE)  # writes trees_predicted.las\r\n```\r\n\r\n---\r\n\r\n## 5. Evaluation of Predicted LAS Files\r\n\r\nYou can compute accuracy, confusion matrix, precision, recall, and F1 directly.\r\n\r\nFuelDeep3D includes evaluation utilities to measure segmentation quality using LAS/LAZ files. These tools compute:\r\n\r\n- Overall accuracy  \r\n- Confusion matrix  \r\n- Per-class precision, recall, and F1-score  \r\n\r\n---\r\n\r\n  ### 5.1.1 Evaluate Performance on a Single LAS File\r\n\r\n  This function allows users to evaluate segmentation performance directly from a single LAS file that contains both ground-truth labels and predicted classes.\r\n  Simply specify which attribute stores the true labels (e.g., \"label\") and which stores the predictions (e.g., \"Classification\"), and the function computes accuracy, confusion matrix, precision, recall, and F1 scores automatically.\r\n\r\n  Use this when **ground truth and predictions are in the same LAS file**, stored in two different fields.\r\n\r\n  - **Ground truth labels** (e.g., column `\"label\"`)\r\n  - **Predicted classes** (e.g., column `\"Classification\"`)\r\n\r\n  ```r\r\n  library(FuelDeep3D)\r\n  library(lidR)\r\n\r\n  # LAS contains both GT (label) and predictions (Classification)\r\n  las \u003c- readLAS(\"trees_predicted.las\")\r\n\r\n  results \u003c- evaluate_single_las(\r\n    las,\r\n    truth_col = \"label\",\r\n    pred_col  = \"Classification\"\r\n  )\r\n  results$accuracy\r\n  results$confusion_matrix\r\n  results$precision\r\n  results$recall\r\n  results$f1\r\n\r\n  ```\r\n\r\n ---\r\n\r\n  ### 5.1.2 Evaluate Performance on Two LAS Files\r\n\r\n  Use this when ground truth labels and predicted classes are in separate LAS/LAZ files.\r\n  Both files must be point-wise aligned (same points in the same order, same number of points).\r\n  The function compares truth_col vs pred_col and returns accuracy, confusion matrix, and per-class precision/recall/F1.\r\n\r\n\r\n  ```r\r\n  library(FuelDeep3D)\r\n  library(lidR)\r\n\r\n  truth_las \u003c- readLAS(\"trees_groundtruth.las\")  # contains truth_col (e.g., label)\r\n  pred_las  \u003c- readLAS(\"trees_predicted.las\")    # contains pred_col  (e.g., Classification)\r\n\r\n  results \u003c- evaluate_two_las(\r\n    truth_las,\r\n    pred_las,\r\n    truth_col = \"label\",\r\n    pred_col  = \"Classification\"\r\n  )\r\n\r\n  results$accuracy\r\n  results$confusion_matrix\r\n  results$precision\r\n  results$recall\r\n  results$f1\r\n\r\n  ```\r\n\r\n  ---\r\n\r\n  This helps to return a list with:\r\n\r\n  - `confusion` – confusion matrix  \r\n  - `accuracy` – overall accuracy  \r\n  - `precision` – per-class precision  \r\n  - `recall` – per-class recall  \r\n  - `f1` – per-class F1 scores  \r\n\r\n  ---\r\n\r\n\r\n  ### 5.2 Print Confusion Matrix\r\n\r\n  ```r\r\n  print_confusion_matrix(results$confusion)\r\n  ```\r\n\r\n  This prints a clean, aligned table such as:\r\n\r\n  ```\r\n  | True \\ Pred |       0 |       1 |       2 |\r\n  |-------------|---------|---------|---------|\r\n  |    0        | 528404  |    1005 |   3253  |\r\n  |    1        | 25457   | 2598520 | 140186  |\r\n  |    2        | 24931   |  449195 | 867824  |\r\n\r\n  ```\r\n\r\n  ---\r\n\r\n  ### 5.3 Print Precision, Recall, F1, and Accuracy in a Table\r\n\r\n  ```r\r\n  print_metrics_table(results)\r\n  ```\r\n\r\n  This produces an easy-to-read table:\r\n\r\n  ```\r\n  | Class   | Precision | Recall | F1_Score | Accuracy |\r\n  |---------|-----------|--------|----------|----------|\r\n  | 0       | 0.9508    | 0.9535 | 0.9521   | 0.9535   |\r\n  | 1       | 0.8940    | 0.9450 | 0.9188   | 0.9450   |\r\n  | 2       | 0.7375    | 0.6552 | 0.6941   | 0.7552   | \r\n  | Overall | 0.8608    | 0.8512 | 0.8550   | 0.9012   |\r\n  |---------|-----------|--------|----------|----------|\r\n\r\n  ```\r\n\r\n  The **Overall** row shows macro-averaged precision, recall, and F1 across all classes.\r\n\r\n  ---\r\n\r\n  ### 5.4 Plot Confusion Matrix (Heatmap)\r\n\r\n  FuelDeep3D can also plot the confusion matrix as a heatmap in R (requires `ggplot2`).  \r\n  These plots help quickly identify which classes are most frequently confused and whether errors are concentrated in specific rows/columns.\r\n\r\n  - `row_normalize = FALSE` shows **raw counts** (best when you want to see absolute error volume and class frequency).  \r\n  - `row_normalize = TRUE` shows **row-normalized proportions** (best for imbalanced datasets; each true-label row sums to 1, so you can compare class-wise performance fairly).\r\n  \r\n  ```r\r\ncm \u003c- table(True = las@data$label, Pred = las@data$Classification)\r\n\r\nplot_confusion_matrix(\r\n    cm,\r\n    row_normalize = FALSE,\r\n    las_name = \"trees.laz\",\r\n    title = \"Confusion Matrix (Row-normalized)\",\r\n    class_names = c(\"0\" = \"Ground\", \"1\" = \"Leaves\", \"2\" = \"Branch\"),\r\n    palette_type = \"viridis\",\r\n    palette_name = \"cividis\"\r\n)\r\n  ```\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"inst/readme/confusion_matrix.png\" alt=\"Confusion Matrix\" width=\"45%\"\u003e\r\n\u003c/p\u003e\r\n\r\n   Row-normalized heatmap (proportion per true class; easier to compare classes)\r\n\r\n  ```r\r\ncm \u003c- table(True = las@data$label, Pred = las@data$Classification)\r\n\r\nplot_confusion_matrix(\r\n    cm,\r\n    row_normalize = TRUE,\r\n    las_name = \"trees.laz\",\r\n    title = \"Confusion Matrix (Row-normalized)\",\r\n    class_names = c(\"0\" = \"Ground\", \"1\" = \"Leaves\", \"2\" = \"Branch\"),\r\n    palette_type = \"viridis\",\r\n    palette_name = \"cividis\"\r\n)\r\n  ```\r\n\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"inst/readme/confusion_matrix_row_norm.png\" alt=\"Confusion Matrix\" width=\"45%\"\u003e\r\n\u003c/p\u003e\r\n\r\n\r\n ---\r\n\r\n  ### 5.5 Class Distribution Summary\r\n\r\n  ```r\r\n  las \u003c- lidR::readLAS(\"C:/path/to/your_file.laz\")\r\n\r\n  # Predicted class summary\r\n  las_class_distribution(las, field = \"Classification\")\r\n  \r\n  # Raw/original label summary\r\n  las_class_distribution(las, field = \"label\")\r\n  \r\n  # With readable names\r\n  labs \u003c- c(\"0\"=\"Ground vegetation\", \"1\"=\"Branch/Stem\", \"2\"=\"Leaves/Foliage\")\r\n  las_class_distribution(las, field = \"Classification\", class_labels = labs)\r\n  \r\n  # Drop NA class (if any)\r\n  las_class_distribution(las, field = \"Classification\", include_na = FALSE)\r\n  ```\r\n\r\n  Shows how many points belong to each predicted class.\r\n\r\n  ---\r\n\r\n  These tools simplify evaluating segmentation performance directly from LAS files without external scripts or reformatting.\r\n  \r\n---\r\n\r\n# Acknowledgements\r\n\r\nFuelDeep3D was supported by:\r\n\r\n- **ESTCP – FuelsCraft:** An innovative wildland fuel mapping tool for prescribed fire decision support on Department of Defense military installations (**#RC23-7779**)\r\n- **EMS4D:** MultiScale Fuel Mapping and Decision Support System for the Next Generation of Fire Management (**#22-2-02-15**)\r\n- **NASA:** ICESat-2 (**Grant #80NSSC23K0941**), Carbon Monitoring System (CMS; **Grant #80NSSC23K1257**), and Commercial Smallsat Data Scientific Analysis (CSDSA; **Grant #80NSSC24K0055**)\r\n- **Object-Based Aggregation of Fuel Structures, Physics-Based Fire Behavior and Self-Organizing Smoke Plumes for Improved Fuel, Fire, and Smoke Management on Military Lands** (**#RC20-1346**)\r\n\r\n# Reporting Issues\r\n\r\nPlease report any issue regarding the FuelDeep3D package to Venkata Siva Reddy Naga (\u003cvs.naga@ufl.edu\u003e)  or Dr. Silva\r\n(\u003cc.silva@ufl.edu\u003e).\r\n\r\n# Disclaimer\r\n\r\n**FuelDeep3D package comes with no guarantee, expressed or implied, and\r\nthe authors hold no responsibility for its use or the reliability of its\r\noutputs.**\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/347413","html_url":"https://ost.ecosyste.ms/projects/347413"}