GreenMerge is a plant image collator for plant phenotyping. It can be used to collect plant images from multiple IoT devices and store them in a database. It also provides a web interface for users to view and download images.
- Support for Multiple IoT Devices: Seamlessly compatible with a variety of IoT devices, including Raspberry Pi, Arduino, and more. Learn More
- Extensive Image Format Support: Accommodates a wide range of popular image formats, such as JPG, PNG, ensuring flexible image processing.
- User-Friendly Web Interface: Provides an intuitive web interface for users to easily view and download images.
- Collator Status Monitoring: Enables real-time monitoring of the collator's status, ensuring smooth operation and high efficiency.
- Any system capable of running Docker and Docker-compose. This includes computers and single-board computers (SBCs) with the following specifications:
- Operating System: Must support Docker (Linux, Windows, macOS).
- Processor: Compatible with ARM64 architecture (for ARM64 OS, requires a CPU greater than ARMv8.2).
- Memory: Minimum of 1GB RAM.
- The collator can be either a Single Board Computer (SBC) or a Microcontroller Unit (MCU):
-
SBC Option:
- Must be Linux-compatible and equipped with a camera.
- Examples include Raspberry Pi Zero 2 W with a camera module like Raspberry Pi camera (IMX219).
- Storage: SD card or appropriate storage medium for the SBC.
-
MCU Option:
- Must support MicroPython and be equipped with a camera.
- Suitable for MCUs that can handle image capture and basic processing.
- Camera compatibility is essential for effective image collation.
-
These hardware setups ensure smooth operation of GreenMerge, allowing for efficient image collection and processing across different environments.
The setup process is similar across Windows, Linux, macOS, and Single Board Computers (SBCs). Follow these steps:
-
Install Docker and Docker-Compose:
- For Windows/Linux/macOS, download and install Docker and Docker-Compose from their official websites.
- For SBCs, ensure the OS supports Docker and install them accordingly.
-
Clone the Repository:
- Use the command
git clone https://github.com/hibana2077/plant_image_collator.git
to clone the GreenMerge repository to your local system.
- Use the command
-
Build and Start the Container:
- Navigate to the
plant_image_collator/server
directory. - Run
docker-compose up -d --build
. This command builds and starts the container in detached mode.
- Navigate to the
-
Access the Web Interface:
- Once the container is running, open your web browser and go to
http://localhost:8501
orhttp://<your ip address>:8501
to access the web interface.
- Once the container is running, open your web browser and go to
This installation process sets up the GreenMerge server, allowing you to start managing and collating plant images effectively.
Follow these steps to set up a Raspberry Pi as a collator:
-
Prepare the SD Card:
- Use the Raspberry Pi Imager to flash Raspberry Pi OS Lite (32 bit) onto the SD card.
- Before flashing, press
Ctrl+Shift+X
to access advanced options. Set yourhostname
, configureWiFi
credentials, and enableSSH
.
-
Initial Raspberry Pi Setup:
- Insert the flashed SD card into the Raspberry Pi and power it on.
- Connect to the Raspberry Pi via SSH:
ssh pi@<your hostname>.local
and log in with your password.
-
Configure Camera Settings:
- Edit the file
/boot/config.txt
and addcamera_auto_detect=0
anddtoverlay=imx219
at the end. - Open the Raspberry Pi configuration tool with
sudo raspi-config
, navigate toInterfacing Options
->Camera
, and enable it.
- Edit the file
-
Update and Install Dependencies:
- Update the OS with:
sudo apt update
andsudo apt upgrade
. - Install Git:
sudo apt install git
.
- Update the OS with:
-
Clone Repository and Setup:
- Clone the GreenMerge repository:
git clone https://github.com/hibana2077/plant_image_collator.git && cd plant_image_collator
. - Run the setup script:
sudo bash ./raspberry_pi_setup.sh
. - Reboot the Raspberry Pi:
sudo reboot
.
- Clone the GreenMerge repository:
-
Configure Collator Settings:
To customization the collator's operations, edit the
collator/config.yaml
file with the following settings:encoding
: Specify the image format. Example:"png"
.interval
: Set the time interval (in seconds) for image capture. Example:"360"
(for capturing images every 360 seconds).notify
: Enable or disable notifications. Set toTrue
for enabling notifications.verbose
: Enable detailed logging. Set toTrue
for more detailed logs.node_name
: Define the name of the node. Example:"NODE_NAME"
.notify_webhook
: Provide the webhook URL for notifications. Example:"NOTIFY_WEBHOOK"
.plant_name
: Name the plant being monitored. Example:"PLANT_NAME"
.URL
: Set the URL for the server where images are sent. Example:"http://YOUR_IP:5000/"
.
-
Start the Collator:
- Start the collator with:
sudo bash ./raspberry_pi_start.sh
.
- Start the collator with:
-
Test Camera Module:
- Test the camera with
libcamera-jpeg -o test.jpg
. - Download the test image to your computer with
scp pi@<your hostname>.local:test.jpg .
.
- Test the camera with
(Still under development)
This project is licensed under the MIT License. See the LICENSE file for details.