Lichenary Technology

How the AI observation system works

Lichenary combines citizen science, image analysis, geographical data and a controlled biological reference database to transform a photograph of a lichen into a structured scientific observation.

AI

AI assists identification. It does not decide the pollution level.

This distinction is central to the Lichenary system. The artificial intelligence model is responsible for analyzing the photograph and proposing a lichen species. The pollution-indicator value is then obtained separately by the Lichenary backend from a predefined species database. This creates a clear separation between image recognition and scientific data processing.

01

The observation begins with a photograph

A participant starts the process by documenting a lichen in the field.

The AI observation page is designed to make scientific data collection as simple as possible while preserving the information required for a useful observation. The participant can either take a new photograph with the device camera or select an existing photograph from the phone or computer.

The selected image is previewed directly in the browser. Before the AI analysis can begin, the system also requires the observation to have a geographical position. This ensures that the biological information can later be connected to a real location on the Lichenary map.

1

Photograph

The participant captures or uploads a clear image of the lichen. The browser checks that the selected file is an image.

2

Preview

The photograph is displayed locally in the browser so the participant can confirm that the subject is visible before analysis.

3

Location

The participant enables browser-based geolocation. Latitude and longitude are collected for the observation.

4

Description

A specific-place field allows the participant to add a human-readable description such as a park, street, building or nearby landmark.

02

Automatic observation data

Some information is collected automatically so that each observation has a consistent structure.

The browser automatically creates the observation date and time using the participant's device clock. The geographical coordinates are obtained through the browser's Geolocation API after the participant gives permission.

These values are placed into hidden form fields and displayed to the participant through the interface. Before being accepted by the server, the coordinates are validated by the Python backend to make sure that latitude and longitude fall within their valid geographic ranges.

Date & time

The browser generates a timestamp in the format required by the observation database. The time is associated with the moment at which the observation is prepared for submission.

GPS coordinates

The browser requests the device's current location. The server subsequently checks that the submitted latitude and longitude are valid geographic values.

03

The AI identification stage

The photograph is sent to the Lichenary backend, which passes it to the Gemini image-analysis model.

When the participant selects Analyze Lichen with AI, the browser creates a multipart request containing the photograph and the observation's geographical information.

The Flask application receives the photograph and reads its image data. The server verifies that an image was actually uploaded and that the MIME type represents an image before sending the photograph to the AI system.

Gemini is given a carefully defined instruction: its responsibility is to identify the lichen species visible in the photograph. It is explicitly instructed not to calculate the pollution indicator and not to invent species outside Lichenary's reference list.

Artificial intelligence

Gemini

Gemini receives the photograph and analyzes its visual characteristics to propose a species.

The model is restricted to the species contained in Lichenary's reference database. If the photograph is not sufficiently clear, the system can return UNKNOWN instead of forcing an identification.

Lichenary backend

Python

Flask receives the AI result and normalizes the returned species name so that small formatting differences do not prevent a database match.

Python then performs the pollution-indicator lookup using Lichenary's fixed reference database.

04

A controlled species database

The pollution indicator comes from a predefined scientific reference table rather than from the AI.

Lichenary contains a structured database of lichen species and their associated pollution-indicator values. Each species in this dictionary has a fixed numerical value between 1 and 10.

Once Gemini proposes a species, the backend searches for that exact species in the Lichenary database. If a match is found, the corresponding indicator value is returned. If the species cannot be matched to the reference data, the observation is rejected rather than being assigned an arbitrary value.

Why separate AI from the pollution calculation?

Separating these two operations makes the system easier to understand, inspect and control. The AI performs visual identification, while the numerical interpretation comes from a predefined Lichenary dataset. The model therefore cannot independently invent a pollution score.

Controlled species list The AI is asked to choose from Lichenary's predefined reference species.
Fixed indicator values Each recognized species has a predefined value in the backend database.
Server-side verification The backend checks the species again before an observation can be stored.

Lichen pollution-indicator scale

1 — more pollution-sensitive 10 — more pollution-tolerant

The value is a biological indicator associated with the identified species. It should not be interpreted as a direct measurement of the concentration of a particular pollutant in the air. Lichen observations are useful for understanding environmental patterns, but they do not replace professional air-quality monitoring instruments.

05

The complete digital pipeline

From a photograph in the field to a structured observation in the Lichenary database.

The entire process is composed of several connected stages. Each stage has a specific responsibility and passes only the necessary information to the next one.

Step 1 Photograph
Step 2 GPS & time
Step 3 Flask server
Step 4 Gemini identification
Step 5 Database lookup
Step 6 Observation review
06

What happens after AI analysis?

A successful AI result is not immediately published as scientific data.

After the AI successfully identifies a species and the backend finds its corresponding indicator value, the result is returned to the participant's browser. The identified species and pollution indicator are displayed in the observation form.

The participant can then submit the completed observation. At this stage the photograph, date and time, location, coordinates, species and indicator value are sent to the final upload endpoint.

Before the observation is stored, the server performs another species lookup. This second validation is important because information displayed in a browser cannot be considered trustworthy simply because it was originally produced by the application.

Human review remains part of the system

Every submitted observation is initially marked as unapproved. An administrator can inspect submitted observations before they become part of the approved public dataset.

This creates an additional layer of quality control: artificial intelligence assists the participant, automated validation protects the database structure, and human review provides a final opportunity to evaluate the observation before publication.

07

Where the observation is stored

Approved observations become structured geographical records that can be used by the Lichenary map.

Lichenary stores observations in a relational database. Each observation has its own record containing information such as the photograph URL, date and time, location, latitude, longitude, identified species, pollution indicator, approval status and the user who submitted it.

Photographs are uploaded to Cloudinary rather than being stored directly inside the database. The database stores the secure image URL associated with the observation.

Approved observations containing valid geographical data can then be requested through Lichenary's observations API. The map uses this structured information to display observations according to their geographic position and pollution-indicator value.

08

Validation and protection

Several checks are performed before information enters the observation database.

Image validation

The server checks that a photograph exists and that the uploaded file identifies as an image.

GPS validation

Latitude and longitude are converted to numerical values and checked against their valid geographic ranges.

Species validation

Species names are normalized and checked against the Lichenary reference database.

Indicator validation

The submitted pollution value is not trusted directly from the browser. It is recalculated from the server's species database.

Authentication

The observation-upload routes require an authenticated Lichenary account.

Approval system

New observations remain unapproved until an administrator reviews them.

09

Why the system is designed this way

The architecture is intended to balance accessibility, automation and scientific control.

A

Accessible

Participants can contribute using an ordinary phone without needing specialist equipment or taxonomic expertise.

B

Structured

Every observation follows the same basic data structure: image, time, location, species and indicator value.

C

Controlled

The AI does not independently create pollution scores. Numerical values come from the predefined database.

D

Reviewable

Submitted observations can be reviewed by an administrator before they become part of the approved public dataset.

10

Understanding the limitations

AI-assisted citizen science is powerful, but it should always be interpreted carefully.

A photograph does not always contain enough information for reliable species-level identification. Lighting, focus, image quality, the angle of the photograph, overlapping organisms and environmental conditions can all affect visual identification.

For this reason, an AI identification should be understood as an automated suggestion rather than an infallible taxonomic determination. Lichenary's review process adds an additional layer of quality control.

The pollution indicator also has an important limitation. It represents the known relationship between the lichen species and pollution tolerance in the Lichenary reference system. It is not a direct sensor reading and should not be interpreted as an exact concentration of air pollutants.

Image quality matters

Clear, focused photographs give the identification system more useful visual information.

AI can be uncertain

A model can make mistakes, which is why the system allows uncertain photographs to be rejected.

Indicators are not sensors

Lichen-based indicators provide ecological information, but they do not replace professional monitoring stations.

From one photograph to a larger environmental picture.

Lichenary brings together people, biology and technology. Each carefully documented observation contributes a small piece of geographical and ecological information. When many observations are collected and reviewed, these individual records can help reveal broader environmental patterns.