AI-Powered Carbon Credit Estimation Model
This project is available on Hugging Face.
1. What It Does
This project uses an AI model to estimate a tree's carbon credit value from an image. It predicts the tree's size and species, then calculates how much COβ it can capture next year.
Note: This is a proof-of-concept. The included model is trained on placeholder data, not real tree images, so its predictions are currently for demonstration purposes only. The main achievement is a complete, working pipeline ready for real data.
2. How to Get Started
Follow these steps to set up and run the project on your own machine.
Step 1: Get the Code & Install Packages
First, clone the repository and install the necessary Python packages.
# Clone the repository
git clone https://huggingface.co/hermits001/SylvaCarbon-0
cd SylvaCarbon-0
# Create a virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
Step 2: Download the Data
The model needs the NEON scientific dataset to learn from.
- Go to the NEON Data Portal.
- Download the "Woody Plant Vegetation Structure" dataset.
- Unzip the downloaded file.
- Rename the unzipped folder to exactly NEON_struct-plant.
- Move this folder into your SylvaCarbon-0 project directory.
- Your folder should now look like this:SylvaCarbon-0/
βββ NEON_struct-plant/ <-- Your data folder
βββ model/
βββ src/
βββ ...
Step 3. How to Use the Model
To Test a Prediction (Recommended)
This is the quickest way to see the project in action. It uses the pre-trained model included in the repository.
- Save any tree image in the SylvaCarbon-0 folder as my_tree.jpg.
- Open the file src/predict.py and make sure the IMAGE_TO_TEST variable is set to "my_tree.jpg".
- Run the script from your terminal:python src/predict.py
src/predict.py
To Train a New Model (Optional) If you want to run the full training process yourself, which takes many hours:
python src/carbon_credit_model.py
Model tree for hermits001/SylvaCarbon-0
Base model
microsoft/resnet-18