News from Romania: We Did a Groundbreaking App that Lets Us Together Protect a Country from Illegal Trees Cutting
April 6, 2024
Want to try out demo Illegal Logging Tracker?
Leave your email by filling out the form via the “Test it out” button
Introduction
Forests are in serious danger due to many reasons as we all know. Our forces in Romania discovered how big a role in that problem plays the aspect of illegal trees cutting.
Climate Change, and wildfires are partially a reason out of our control, but illegal trees cutting and the market that comes out of it – these are completely dangers caused by humans, and this Artificial Intelligence Application project is a way to show how much power we hold to stop this.
We managed to achieve impressive results of producing a functionating app from scratch within one month.
In one of the sections you will be also able to discover what are the further applications of the methodologies we used, who knows maybe it will be a gamechanger for you too?
The Problem
In 2010, Romania’s forests covered 6.32 million hectares, which was about 32% of the country’s land area.
By 2023, Romania lost 17.9 thousand hectares of these forests. To put this into perspective, the amount lost is nearly twice the size of Manhattan.
A significant portion of this loss is due to illegal logging, with approximately 3 hectares of forests lost every hour.
This illegal activity not only damages the environment but also costs Romania approximately $6 billion each year, not even mentioning other countries facing this problem.
Despite the extensive damage, less than 1% of the illegal wood transports are caught by the authorities.
Why is illegal cutting of trees actually a problem?
- Economic Impact: Illegal logging drives down timber prices by introducing cheaper, unlawfully harvested wood into the market, undercutting businesses that invest in sustainable practices and reducing government revenues that benefit industries.
- Supply Chain Risks: It threatens the stability of supply chains for businesses reliant on sustainable wood, potentially leading to resource depletion and increased costs.
- Reputational Risk: Associations with illegal logging can damage a company’s reputation, as consumers prefer environmentally responsible products, leading to potential loss of sales and brand loyalty.
- Legal Consequences: Companies connected to illegal logging, even inadvertently, face legal penalties, fines, and sanctions under international and national laws designed to combat deforestation.
- Environmental Responsibility: Protecting forests is crucial for maintaining biodiversity, ecosystem stability, and climate regulation, aligning with corporate social responsibilities and long-term sustainability goals.
The Goal
This project aimed to create a mobile application that utilized advanced AI technology for real-time monitoring.
The idea was to transform every smartphone into a watchful tool and every user into a guardian of the forest. This digital empowerment of citizens and enhancement of enforcement capabilities were designed not just to reduce illegal logging but also to promote a sustainable relationship between people and Romania’s precious forests, ensuring a healthier environment for future generations.
The Background
How to fight against big problems? Together!
The idea behind the whole infrastructure of the app comes from a very simple statement: We are more powerful when we join forces than as individuals.
Individually, we are one drop. Together, we are an ocean. ― Ryunosuke Satoro
Empowering people to take ownership of environmental conservation is a highly effective strategy. When individuals feel personally invested in the health of their environment, they shift from being passive observers to active defenders. This ownership builds a deeper connection to the land and a commitment to protect, in fact this way of thinking can be applied in so many other different industries or problems.
Additionally, an empowered community forms a vigilant network that enhances monitoring and enforcement far beyond traditional methods, utilizing local knowledge for timely and effective actions.
In the context of Omdena, our company’s foundation is built on the power of community collaboration. When a diverse group of people comes together to address a challenge, the variety of perspectives and expertise synergizes, leading to more innovative and comprehensive solutions than any single person could develop alone.
Shortening the time of Law Enforcement Reaction is Important
Typically, law enforcement agencies face significant delays in detecting and responding to illegal deforestation activities. Traditional methods rely heavily on physical patrols and sporadic reporting, which can mean that by the time officers are alerted to a situation, the perpetrators are long gone. In some cases, it might take days or even weeks to gather enough evidence to act, giving illegal loggers ample time to cover their tracks and escape penalties.
The Forest Guard Project dramatically changes this scenario by harnessing cutting-edge technology to provide real-time data directly to law enforcement. This innovative approach reduces response times from days to mere minutes.
The Obstacles
Developing Reliable AI Systems under Challenging Conditions
The project needed AI systems capable of reliably identifying license plates and wood logs from various types of imagery, often under challenging conditions such as poor lighting or obscured views. The AI had to be highly accurate to ensure that law enforcement could trust the data for making quick decisions.
Short time frame for creating an Accessible App
Creating a mobile app that was intuitive and accessible for all citizens in a short period of time, regardless of their tech-savvy, was crucial. The app needed to allow users to easily report suspected illegal activities and integrate seamlessly with the national enforcement systems for swift action.
Our Approach
Step 1. Identifying The Features and the Technologies that need to be used
Aiming to Implement Advanced License Plate Recognition for Forest Monitoring
Our project aimed to enhance forest monitoring by implementing License Plate Recognition (LPR) technology.
We planned to use a system called YOLOv8 to accurately identify license plates in images captured within forested areas. This approach involved using bounding boxes to detect and highlight license plates, ensuring precise measurements by maintaining a standard reference length. Additionally, we intended to integrate Optical Character Recognition (OCR) technology to read the text on these plates, allowing us to access relevant legal documents and strengthen our enforcement capabilities against illegal timber transport.
Making Sure it will be a Compliant and Effective Forestry App: Synchronization with Legal Requirements
Creating a functional and compliant app in the forestry sector involves navigating complex legal requirements, which can be having serious consequences.
The Forest Guard Project demonstrates a powerful solution to this challenge by integrating with SUMAL, the national legal platform. This integration allows the app to access real-time legal documents crucial for forestry and timber transport regulations. By efficiently extracting and analyzing this information, the app provides businesses with essential insights into the legality of their logging operations.
This not only aids in informed decision-making but also ensures that the operations adhere to the latest laws and regulations. Incorporating such technology into your app can significantly simplify legal compliance, making it easier for businesses to focus on growth while maintaining sustainable and lawful practices.
Identifying the technology for Log Volume estimation
Our Forest Guard Project needed to also be able find and measure logs in forests, ensuring they are legally cut. The system takes pictures from drones and cameras in the woods, spots the logs, and calculates how big they are. It then checks these measurements against official records to see if the logs were cut without permission. This helps us keep an eye on the forests and stop illegal logging, protecting our precious woodland areas.
Integrating User Reports into a Centralized System
Integrating AI detections and user reports into a centralized system allowed for real-time alerts to be sent to law enforcement, enabling faster and more effective responses to illegal logging incidents.
Step 2: Identifying and Collecting the Information (Data) that we would Create the System on
We started by gathering the right kind of Data, which involves collecting lots of pictures—specifically, images of license plates and wood logs.
Here’s how we did it:
For License Plates: We collected 1,457 images from two major sources—the Roboflow Dataset and the Romanian License Plate Dataset. These images help our system learn what different license plates look like, which is important for recognizing vehicles in the forest. We made sure all these images were the same size and format so our system could easily understand and use them to learn.
For Wood Logs: We gathered 2,585 images showing various wood logs, taken from similar databases. These images teach our system to recognize different types of logs and their conditions, which is crucial for identifying illegal logging activities.
Both collections of images were carefully prepared to maintain high quality and consistency, which ensures our system can perform well in real-world conditions.
By using these images, our system learns to identify what’s normal and what may be signs of illegal activities, helping to protect our forests more effectively. This method of teaching our system through specific images is like giving it a crash course in what to look out for in the forest.
Step 4: Selecting Specific AI Methods and Frameworks to Achieve Technical Goals
Choosing the Right AI Model for Mobile Efficiency
When building our mobile app for monitoring forests, choosing the right technology was crucial to meet our goals of speed and accuracy. We needed a system that was fast enough to work on mobile devices but still accurate in detecting details like license plates.
Optimizing with YOLOv8 Nano
After testing several options, we chose a model called YOLOv8 Nano. This model is very lightweight, only 6.3 MB, making it quick and efficient for mobile use without losing the ability to correctly identify and process images.
Enhancing Text Recognition with TrOCR
Alongside YOLOv8 Nano, we incorporated a technology called TrOCR. This is a type of Optical Character Recognition (OCR) technology, which means it’s designed to read text from images—like numbers and letters on license plates. TrOCR is especially good because it’s pre-trained, which means it comes already equipped with a lot of knowledge about how to recognize text, and we fine-tuned it to work even better for our specific needs.
Rigorous Testing and Evaluation
Throughout the development, we continuously tested and compared different methods using a set of 73 specially prepared images. This helped us ensure we were choosing the best technology not just theoretically, but in practical, real-world conditions.
This approach ensures that the app is not only effective but also reliable in protecting our forests by quickly identifying illegal logging activities.
Step 5: Transforming it all into a Mobile Application
Turning our AI project originally built in Python, into a user-friendly mobile app involved several key steps.
First, we identified the main features of our AI that need to be included in the app. Next, we used a mobile app development platform called Flutter, which lets us write one set of code that works on both Android and iOS phones.
We translated our Python code into Dart, the language used by Flutter, adapting our AI’s abilities to fit within the app environment. For complex AI tasks, we set up a cloud server that our app can talk to whenever it needs some heavy lifting done. This means our app can run smoothly on your phone without using up all its resources.
Finally, we tested the app thoroughly to ensure everything works perfectly.
The app is not yet deployed in the app stores because that requires more funds and support to be collected.
Benefits and other Applications of this Technology
Applied Methodology 1:
Precise License Plate Detection Analysis
Integrated with a Database or Law Regulations
Can also be utilized in:
- Law Enforcement and Security: Enhance surveillance and identify stolen vehicles for improved public safety.
- Parking Management: Automate entry/exit processes and optimize parking space allocation for customer convenience.
- Toll Management: Facilitate automatic toll collection and reduce congestion at toll booths for smoother traffic flow.
- Logistics and Transportation: Enable real-time fleet monitoring and enhance route optimization for efficient logistics operations.
- Retail and Commercial: Optimize parking space management and enhance security measures for better customer experience.
- Smart Cities: Improve traffic management and enforce parking regulations for enhanced urban mobility and safety.
Applied Methodology 2:
Real Time integration and Synchronisation with Legal Systems
Can also be utilized in:
- Legal Services: Law firms and legal departments can utilize AI for real-time access to legal databases, case law, and statutes, enabling efficient legal research and analysis.
- Corporate Compliance: Companies can use AI to monitor regulatory changes, ensure compliance with legal requirements, and manage risk in real-time, thus enhancing corporate governance.
- Financial Institutions: Banks, investment firms, and insurance companies can leverage AI for real-time compliance monitoring with financial regulations, detecting fraudulent activities, and mitigating risks.
- Healthcare: Healthcare providers can integrate AI with legal systems for real-time compliance with healthcare regulations, managing patient data privacy, and ensuring adherence to medical laws and standards.
- Government Agencies: Government departments and regulatory bodies can benefit from AI for real-time monitoring of legal compliance across various sectors, facilitating regulatory enforcement and policy-making processes.
- Technology and Software: Tech companies can integrate AI with legal systems for real-time compliance with intellectual property laws, software licensing agreements, and data protection regulations.
- E-commerce and Retail: Online retailers and e-commerce platforms can use AI for real-time compliance with consumer protection laws, privacy regulations, and international trade laws, ensuring a seamless and legal shopping experience for customers.
- Transportation and Logistics: Companies in the transportation and logistics sector can leverage AI for real-time compliance with transportation regulations, customs laws, and safety standards, ensuring the legality of their operations.
- Media and Entertainment: Media companies can use AI for real-time compliance with copyright laws, content licensing agreements, and censorship regulations, ensuring legal distribution and broadcasting of content.
- Insurance: Instant analysis with the regulations on the reporting damages, detecting the types of damages, through AI synchronization.
Time Frame
The whole Project took just 1 month knowing we needed to:
- Identify a whole project pipeline from scratch, finding and preparing the Datasets. Then also creating a functionating AI Powered App.
The Outcomes and Achievements
Our Forest Guard app has made significant strides in enhancing forest monitoring and protection. Here’s a look at the remarkable features and advancements that have made a real difference in combating illegal deforestation.
Instantaneous On-Device Processing
At the core of our app’s functionality is edge detection technology, which allows for instant processing directly on the user’s device. This feature accelerates performance and secures data privacy, enabling users to operate independently of external servers or cloud platforms. The result is a seamless and responsive experience, essential for effective forest monitoring.
Precision in License Plate Detection
A standout feature of our app is its ability to detect multiple license plates in real-time accurately. This capability extends beyond speed to ensure precision. Users can swiftly identify and adjust the correct license plate, significantly reducing errors and enhancing data reliability.
Cutting-Edge Real-Time Wood Log Detection
Beyond license plates, our app excels with its real-time detection of wood logs. By allowing users to position trucks within the frame, the app fine-tunes its detection parameters continuously, ensuring only the most accurate data is captured. This functionality is crucial for promptly identifying and acting on suspicious logging activities.
The Guarantee of Accuracy with Manual Confirmation
To guarantee the highest accuracy, our app includes a manual confirmation step. This critical feature allows users to review and validate the information before finalization, fostering trust in the app’s outputs and empowering users to contribute to the accuracy of the data collected. This process reinforces the app’s role as a dependable tool in forest protection.
These innovations not only highlight our commitment to technological excellence but also underscore our dedication to environmental conservation. By leveraging these advanced tools, the Forest Guard app is setting new benchmarks in the effort to combat illegal logging, making a significant impact on forest conservation efforts.
Functionalities that work even Offline
The data is processed locally on the phone, so basically the wood log detection would work even offline .
Minimal Maintenance Costs
The models were trained without the help of any cloud platform(AWS, Azure) and they were all trained locally to make the project as cost effective as possible
Some Photo and Video visualizations of outcomes:
We were able to even precisely be able to detect the Log Size!
The diameter is extracted by taking the length of the bounding box of each log and converting it in centimeters with the pixel-centimeter ratio.
Further Possibilities
- Scalability for Expansion of Protecting New Territories: It would be a great step further to take this proof of concept to the scalability level, where the app could also work in other countries with other laws, datasets and even Plate Designs.
- Improving Looks and Interaction: Implementing UI enhancements to make the app not only more functional but also visually appealing, enhancing user engagement and overall satisfaction.
- Gallery Integration: For users to have the option to upload photos from their device gallery, expanding the app’s image capture capabilities and accommodating diverse user preferences.
- Advanced Image Storage: Adding functionality to store and manage prediction images, allowing users to review past detections and track data over time for more thorough analysis and monitoring.
- Satellite Insights: By integrating satellite imagery analysis, the app could aim to provide users with comprehensive insights into environmental changes, enhancing our deforestation monitoring capabilities.
- Direct Authority Contact: New features will enable users to directly connect with relevant authorities.
Final Remarks
This project was completely open source and volunteer work. Moreover, it was done having no initial resources and no funds. We built it completely from scratch without even cloud platforms or external help.