mayrajeo / tree-detection-evo

Code repository for the paper Tree species classification from airborne hyperspectral and LiDAR data using 3D convolutional neural networks
96 stars 28 forks source link

the whole workflow about how to create Training and verification data? #6

Open adminmyw opened 2 years ago

adminmyw commented 2 years ago

Hi ,

could you tell me the whole workflow about how to create Training and verification data?

in your code Training and validation data generation.ipynb, there has no code for Training and validation data generation. please tell me how to create my own Training and validation data.

THANK YOU VERY VERY MUCH!

mayrajeo commented 2 years ago

Hi,

The workflow is pretty much the following:

  1. Check the raw hyperspectral data and see if it needs some processing, mostly covered in Data exploration and preprocessing.ipynb. In our case we needed to a. Match and resample VNIR and SWIR tiles, as they had different spatial resolutions b. Clip canopy height model from the tiles, in order to detect the trees c. Do some clipping and scaling to have nicer values
  2. Match our field data to the aerial data, covered in Individual tree detection, segmentation and matching to field data.ipynb a. Detect the treetops from CHM using tree_detection and dalponte2016 functions from lidR R package. (getContoursDalponte.R) b. Match field data to detected treetops and extract separate patches for each of the matched trees (match_field_data.py)
  3. Split these patches by location (column identifier in tile id) instead of random split in order to avoid data leakage. (Training and validation data generation.ipynb).