This is a tool designed to automate the analysis of Rhizobia images taken over a long period of time.
How go use the visualizer tool to view the results:
-
Open the 'select_crop_num.html' file in your browser
-
Select the crop number you want to view the results for
-
Select the date you want to view the results for
-
Select the nodule that you want to view the results for
We place a Raspberry Pi Camera in a photo rig where a water pouch containing Rhizobia is placed.
The camera takes a picture against a white LED light panel.
Due to the arrangement of the light panel behind the water pouch, the light that hits the camera has passed through the water pouch. This allows for reliable extraction of data from the images.
The staff take a picture of each water pouch every couple of days.
The images are gathered until the end of the experiment.
Then the images are then uploaded to a server for analysis.
2: Run Perspective Correction
We take the images and run them through the Perspective Correction tool to remove the perspective distortion from varying camera angles & distances.
This will chop up the images into smaller images of size 1410x600.
Then we run root painter on the corrected images.
The output of root_painter is a CSV file that contains the number of nodules in each image, as well as the composite images showing the red mask and the original image.
Step 4: Run Root Painter CSV to JSON
The CSV file and images are then processed by the Root Painter CSV to JSON tool to generate a bunch of folders containing JSON files that contain the data for each nodule as well as the composite images.
The 'output' folder from Root Painter CSV to JSON is the 'data' folder for this tool.
python3 main.py
You should see a prompt asking you if you would like to clear the output dir:
--------------------------------------------------
Starting Rhizobia Analyser v8.0...
It is recommended to clear the output directory before running this script.
Would you like to clear the output directory? (y/n):
After that you will be prompted to type the path to the directory containing the JSON files that you want to process:
Enter crop folder dir ie: 'data', 'data/crop1000', etc. (or 'exit' to stop):
The tool is made up of two parts: The Python Scripts and the HTML files. The Python Scripts are used to process the images and the HTML files are used to display the results.
You can open up the HTML visualizer either of 3 ways:
-
This is a github pages repo, git hosts a web server for us that will serve the contents of this repo. You may go to this link to try it out: https://umn-vr.github.io/Rhizobia-Analyzer/HTML/select_crop_num.html
-
You can download the repo and open the HTML files locally. If you want to open the HTML files locally, you might want to run a local server, or if you don't feel like doing that Disable CORS(Cross-Origin Resource Sharing) restrictions in your browser. If you disable CORS restrictions make sure to re-enable it after you are done, there could be security issues if you leave it disabled.
Start a local server to host the HTML files:
- Install Python 3.10.0 or higher
- Open a terminal and navigate to the directory where you have the HTML files
- Run
python -m http.server 8000
or/usr/local/bin/python3.10 -m http.server 8000
if you have multiple versions of Python installed - Open a browser and go to http://localhost:8000/
- Navigate to the HTML Directory and select the HTML file select_crop_num.html
By facilitating a deeper understanding and more efficient use of Rhizobia in crop production, these tools support the shift towards more sustainable, low-impact farming practices.
Rhizobia as a Source of Plant Growth-Promoting Molecules
Rhizobia bacteria form symbiotic relationships with leguminous plants, facilitating a natural process of nitrogen fixation. These bacteria convert atmospheric nitrogen into a form that plants can use. This process is a sustainable and eco-friendly alternative to synthetic fertilizers, reducing the need for chemical inputs in agriculture. Rhizobia's role in enhancing soil fertility and plant nutrition is especially crucial in low-resource settings or organic farming.
Nitrogen is a vital nutrient for plants, crucial for the synthesis of proteins, nucleic acids, and chlorophyll. It's a core component of amino acids, the building blocks of proteins, which are essential for the growth and development of plant tissues. Nitrogen also plays a significant role in photosynthesis, the process by which plants convert light energy into chemical energy.
Nitrogen: The environmental crisis you haven’t heard of yet
Synthetic fertilizers, often derived from fossil fuels, have significant environmental and economic drawbacks.
They contribute to greenhouse gas emissions both in their production and use.
Toxic algae blooms in MN waters
Nitrogen from these fertilizers can leach into water bodies, causing eutrophication, harmful algal blooms, and water quality degradation.
Economically, the cost of synthetic fertilizers is subject to the volatility of oil prices and can be prohibitively expensive for small-scale or resource-poor farmers.
Fertilizer can also be highly explosive substance, posing a safety risk to workers and communities before it is even used.
Integrating Rhizobia into agricultural practices can significantly contribute to global food security by increasing crop yields in a sustainable manner, especially in regions with limited access to synthetic fertilizers. Additionally, by reducing greenhouse gas emissions and enhancing soil carbon sequestration, this approach aligns with global efforts to mitigate climate change.
The primary objective of the Rhizobia Analyzer software is to develop an advanced tool that can:
- Analyze Rhizobia Growth: Determine the growth rate and health of Rhizobia within nodules.
- Monitor Nodule Health: Identify when and why plants may decide to deactivate (kill) certain nodules.
- Evaluate Nitrogen Uptake: Assess which treatments lead to increases in nitrogen uptake by plants.
- Tracking Nodule Size Over Time: The software meticulously tracks the size of nodules over time across thousands of crops. Each crop receives a specific treatment to test its effectiveness.
- Data-Driven Analysis: Leveraging the captured images and data, the software utilizes algorithms to measure and compare the growth rates and sizes of nodules, providing insights into the effectiveness of different treatments.
- Treatment Evaluation: By correlating nodule health and plant growth data, the software helps identify which treatments optimize nitrogen fixation and overall plant health.
Made in colaboration with R Ford Denison