Skip to content

Globe-Eater/Cedar_Tree_Classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cedar Tree Image Classifier

Intended for the use of Google Earth Imagery to identify Cedar Trees within the State of Oklahoma.

Input Imagery:

Aerial Imagery

Output Image:

Prediction

Usage:

  1. Collect data from Google Earth Pro as .png file types.
  2. Put the imagery into a folder named Unclassified.
  3. Create the enviroment with Anaconda. If Anaconda has not been installed please visit:
  4. Conda create env -f enviorment.yml
    
  5. Activate the enviroment by using the command:
  6. conda activate tensorflow
    
  7. Run Image_Slicer.c over the folder contraining Unclassified. This will create a new folder containing 160 by 160 slices of the images.
  8. ./slice.out
    
  9. Run Prediction.py to create black and white images of where Cedar Trees are as white and where they are not as black. This will output the images into a file named predictions.
  10. python prediction.py	
    

Custom Training:

Input Data

  • Imagery should be from Google Earth Pro at 1046px by 586px resolution or greater.
  • The time of the year the imagery was taken should be during the winter months for best results.
  • The pre-trained model was done on imagery with 1046px by 586px.

Image preprocessing

This folder will contain programs such as Image_Standardization.c that will split images to the correct sizes for the model to process.

Labeling the Data

To train your own model you will need to create a training dataset. This will require you to make duplicates of the images you want to classify. One will be in normal RGB color the other will require you to edit the imagery marking where Cedar Trees are. This can be done with using Microsoft paint, blender, photoshop, or varity of image modification software. Paint over the Cedar trees with white. Then run Image_Standarize.c over the labled imagery to convert it to a black and white image. You can do as many or as few as you like. The more input data you give the model the better it will be able to classify Cedar Trees from unseen images.

Manual Labeling

Training the model:

  1. After you have labeled your images place them in the following folders: training_img, labeled_img.
  2. Activate the Anaconda enviorment by:
  3. conda activate tensorflow
    
  4. Run Model_Builder.py by:
  5. python Model_Builder.py
    

Getting predictions from your new model:

By running predction.py the program will use your new model.

About

Home of the original TREE-EM. (Tree Evaluation Model.) Reads in leaf-off imagery, and attempts to classify Cedar trees.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published