0% found this document useful (0 votes)
7 views5 pages

Final Code4cause Paper

The document presents Greensight, a machine learning model developed to analyze satellite images and determine greenery percentages in urban areas, aiming to address deforestation and climate change. The model uses image processing and K-Means clustering to categorize areas based on their greenery levels, revealing spatial trends and highlighting regions that require more greenery. The findings suggest that increased greenery correlates with lower CO2 levels, emphasizing the importance of urban green spaces for environmental health and sustainability.

Uploaded by

apatel356
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views5 pages

Final Code4cause Paper

The document presents Greensight, a machine learning model developed to analyze satellite images and determine greenery percentages in urban areas, aiming to address deforestation and climate change. The model uses image processing and K-Means clustering to categorize areas based on their greenery levels, revealing spatial trends and highlighting regions that require more greenery. The findings suggest that increased greenery correlates with lower CO2 levels, emphasizing the importance of urban green spaces for environmental health and sustainability.

Uploaded by

apatel356
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Greensight: Mapping Urban Greenery with Machine Learning and CO₂

Levels

By:
Code4Cause Cohort, 2025:
Tanvi Bharath
Ronak Garg
Ayaan Ahmed
Srihitha Thenneru
Ridhi Rao
Sathvik Bharadwaj
Raghav Marathe
Dhanvi Thejo Prakash

Introduction:
Deforestation is happening, and millions of creatures are yet to become extinct. This is letting CO2 levels
rise along with it, too. Our environment is in crisis, and a solution is urgently needed. The more
deforestation, the more climate change. We must plant more trees and start addressing the pressing issue
of climate change. But first, how do we know where to start? How do we determine where to plant trees
and how to plant? The solution is simply Green Sight - our Machine Learning Model that can detect
greenery percentages of areas just through satellite images!

On an average day in California, cars emit nearly 30 pounds of carbon dioxide. Trees play a crucial role
by absorbing carbon dioxide and releasing oxygen: each tree can take in up to 48 pounds of carbon
dioxide per year. Therefore, it is vital to plant more trees and increase greenery. We can address
deforestation by replanting trees through reforestation, reducing the cost of paper, palm oil, and
sustainable wood, and making environmental laws stricter.

We’re also taking direct action with our project, Greensight, as we said before, it is a tool we created to
analyze satellite images from Google Maps. By analyzing these images pixel by pixel, Greensight can
calculate the greenery percentage of a given area. This helps people see where more greenery exists and
highlights where trees should be planted, a key first step toward conserving our forests for the future.

Methods:
To measure the amount of greenery in different city areas, we used publicly available satellite images
from Google Maps. The process involved selecting specific locations, such as Sacramento, Los Angeles,
Sunnyvale, and other parts of the Bay Area, then capturing their satellite or street view images. We
recorded exact latitude and longitude for each spot, took screenshots, and uploaded these images to our
analysis tool.
Greenery Analysis: Machine Learning Model
Our main tool for analyzing greenery percentages was Green Sight, a machine learning model we
developed using Python. Here’s how it works:
●​ Image Processing: Each screenshot was resized for consistency and ease of analysis.
●​ Block Segmentation: We broke the image down into small square blocks (for example, 15x15
pixels each).
●​ Color Analysis: For each block, we calculated the average color to figure out how much green
was present, using the proportion of green pixels compared to the total color.
●​ Clustering with K-Means: We applied K-Means clustering (an unsupervised learning method) to
group blocks by their level of greenery into three categories: low (red), medium (yellow), and
high (green).
●​ Visualization and Calculation: The blocks were overlaid on the original image with colored
transparent circles, helping us visually confirm areas with more or less greenery. The overall
greenery percentage was calculated as the ratio of “green” blocks to the total blocks in each
image.

Results:

Our revealed clear spatial trends in greenery coverage. Western regions tended to have a higher
percentage of greenery compared to eastern areas, while southern regions generally showed less greenery
than northern regions. Only a few spots had more than 30% greenery. Even within the same area, some of
the greenery percentages were different. Some areas need more greenery than others. For example, in the
central US, there is a relatively lower greenery level than areas like the east coast. This indicates how
different areas need different amounts of greenery.
Some parts of California have a lot of greenery, but a majority of those places have a lot of civilization,
stores, concrete and buildings nearby. Observation of California via satellite imagery indicates clusters of
urbanization separated by areas of natural greenery.

Based on the images the users gave, the outcome of our predictive model shows us if there was greenery
with color-coded circles. If the color was red, it meant there was less or no greenery there. Yellow circles
denoted areas with a medium amount of greenery in that place. If there were green circles in a place, it
meant there was a lot of greenery there. The model used the K-means function to help cluster and the
Panda function to help analyze the function. The outcome was mostly accurate but this is not guaranteed
to be a final product as it took only one trial.
Several factors affected accuracy, including variation in screenshot sizes and inconsistent image quality.
Borderline cases, where greenery percentages were close to category thresholds, sometimes led to
incorrect classifications. The model may also not recognize some colors as green if the images are not
clear.
The areas that were flagged and needed more greenery in our model were generally areas that were
urbanized or in school districts such as Homestead High School and Cupertino Middle School, while
areas such as the Homestead Square Shopping Center were also noted as needing more greenery in the
area.
The inconsistency of the photographs could also impact the greenery in suburban and residential areas, as
the variation in size of the screenshot could affect how much greenery the model needs to be considered
as enough to become a placeholder for greenery. For example, a screenshot with a smaller size might
suggest that 2 trees are big enough for a greenery icon, but a screenshot of a larger size might need 3
times that amount for the same effect.
Discussion:

Based on our research, we found that the places with more greenery have more trees, and therefore filter
out more pollutants, resulting in lower carbon dioxide (CO₂) concentrations. For example, let's compare
Los Angeles and Sacramento.The level of greenery for LA is around 24.9% and the level of greenery in
Sacramento is 19.1%. The CO2 level in Los Angeles is around 46 million tons of CO2 emissions and for
Sacramento it is around 8 million tons. One unexpected thing we noticed is that LA has more greenery,
but has a significantly greater amount of CO2 than Sacramento which has less greenery, probably because
of the high population and cars. A limitation of our project was that we were not able to create or find an
application that could assist us in finding the percentage of co2 emissions in a given city.

Meanwhile, this is the amount of greenery squares found in a city block in Sacramento and the percentage
of greenery in that block based on the program:

Additionally, this is the amount of greenery in Los Angeles based on our program:​
Conclusion:

Urban areas in our region are especially vulnerable to the effects of global warming because of
their higher population density, abundance of buildings, and lack of natural green spaces. Trees and
other forms of greenery, such as those found in parks or along city streets, play a crucial role in
helping to address these challenges. Our research shows that when a city has a higher percentage of
greenery, it tends to experience lower levels of carbon dioxide.

By using outputs from our Machine Learning model, city planners and foresters can make
informed decisions about where to add green spaces, not only improving the looks of our
neighborhoods but also reducing heat, cleaning the air, and giving everyone more chances to
experience nature. These focused efforts to grow more urban greenery are a powerful step forward
in the fight against climate change and habitat loss. With the knowledge and tools we have
developed, we are ready to help shape a greener, healthier, and more sustainable future for all.

You might also like