Central Codebase for Applied AI Team
ubcagrobot / appliedai Goto Github PK
View Code? Open in Web Editor NEWCentral Codebase for Applied AI Team
Central Codebase for Applied AI Team
determine which is better: resized image dimensions or original image dimensions (scaling the bounding boxes in husan's node)
With the Raspberry Pi now being used as our main source for ROS for the foreseeable term please complete all items in this issue.
Equipment needed:
Checklist:
Hard real-time systems have strict, non-negotiable timing constraints where tasks must complete within a guaranteed timeframe.
Soft real-time systems have timing constraints that are important but not as strict as hard real-time systems. Missing a deadline is undesirable but not catastrophic.
Task Scheduling: Use appropriate task scheduling algorithms to ensure timely execution.
Real-Time Clocks and Timers:
Deadline Monitoring:
Deterministic Execution Paths: Minimize variations in execution times to achieve deterministic behavior.
Real-Time Guarantees: Provide guarantees for response times and completion times.
Input and Output Constraints: Minimize the latency associated with input and output operations.
Task Offloading: Offload non-critical tasks to secondary processors or devices.
Interrupt Handling:
Resource Reservation: Reserve resources such as CPU time, memory, and bandwidth for critical tasks.
Real-Time Networking: Minimize communication latency in real-time networks.
Testing and Validation:
Continuous Monitoring:
Weed object detection will be a crucial task involved in FRE 2025. Please read more about the competition here. We will be required to perform object detection (bounding boxes + class probabilities) and deliver the resultant bounding boxes and probabilities to the extermination subteam. Please keep in mind that this model that is developed will have to be run on Nvidia systems.
We are aiming to create a general weed classifier that can identify various types of weeds as the competition has not stated what weeds will be used. The first step to solve this problem effectively is to define the scope of work, methods, and approaches to develop a reliable object detection solution.
Action Items:
Research industry approaches to log metric data for robotics applications
Logging Specific:
rclcpp::TimeSource and rclcpp::Clock:
Logging Statements (RCLCPP_INFO, RCLCPP_WARN, etc.):
Histogram equalization can help improve the contrast of an image, which can be beneficial for object detection in varying lighting conditions.
import cv2
def preprocess_image(image):
# Convert image to grayscale
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
# Apply histogram equalization
equalized = cv2.equalizeHist(gray)
return equalized`
Gamma correction adjusts the brightness of an image, which can help compensate for variations in lighting conditions.
import cv2
import numpy as np
def gamma_correction(image, gamma=1.0):
# Build a lookup table mapping the pixel values [0, 255] to their adjusted gamma values
inv_gamma = 1.0 / gamma
table = np.array([((i / 255.0) ** inv_gamma) * 255 for i in np.arange(0, 256)]).astype("uint8")
# Apply gamma correction using the lookup table
corrected = cv2.LUT(image, table)
return corrected
Adaptive thresholding can be useful for segmenting objects from the background in images with varying lighting conditions.
import cv2
def adaptive_thresholding(image):
# Convert image to grayscale
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
# Apply adaptive thresholding
thresholded = cv2.adaptiveThreshold(gray, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 11, 2)
return thresholded
Color normalization techniques can help reduce the impact of varying lighting conditions on color-based features in object detection.
import cv2
def color_normalization(image):
# Convert image to LAB color space
lab = cv2.cvtColor(image, cv2.COLOR_BGR2LAB)
# Compute mean and standard deviation of the L channel
l_mean, l_std = cv2.meanStdDev(lab[:, :, 0])
# Normalize the L channel
normalized_l = (lab[:, :, 0] - l_mean) / l_std
# Merge normalized L channel with original AB channels
normalized_lab = cv2.merge([normalized_l, lab[:, :, 1], lab[:, :, 2]])
# Convert back to BGR color space
normalized_image = cv2.cvtColor(normalized_lab, cv2.COLOR_LAB2BGR)
return normalized_image
You can combine multiple preprocessing techniques to further enhance the robustness of your object detection system against varying lighting conditions.
def preprocess_image(image):
# Apply a combination of preprocessing techniques
equalized = cv2.equalizeHist(image)
gamma_corrected = gamma_correction(equalized, gamma=1.2)
thresholded = cv2.adaptiveThreshold(gamma_corrected, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 11, 2)
return thresholded
Grape quality assessment is a fundamental practice in viticulture (the cultivation of grapevines) that involves evaluating the attributes of grape clusters to determine their overall quality and readiness for harvest. This assessment is of paramount importance for vineyards and winemaking for several reasons:
Machine learning models can significantly enhance grape quality assessment by providing objective, data-driven insights and automation capabilities. Here's how machine learning contributes to grape quality assessment:
Attack one of the above concepts for grape quality assessment. From my understanding, quality grading may be the most straightforward, but I think also automated image analysis would be interesting to tackle
Requirements:
Action Items:
Add ROS2 Launch configuration commands with parameters that incorporate the following:
More documentation and Examples:
Metric for accuracy in display node (find sample data)
Profile ROS2 Nodes:
Maize object detection will be a crucial task involved in FRE 2025. Please read more about the competition here. We will be required to perform object detection (bounding boxes + class probabilities) and deliver the resultant bounding boxes and probabilities to the extermination subteam. Please keep in mind that this model that is developed will have to be run on Nvidia systems.
In general, it is useful for various agricultural applications, including yield estimation, pest detection, and crop monitoring. However, the first step to solve this problem effectively is to define the scope of work, methods, and approaches to develop a reliable object detection solution.
Action Items:
Play around with dummy models
Research on whether the .h files for different model types will affect how the jetson node is configured
different models to test:
YOLO and FRCNN in the Test models Folder
Following this, reach out to these people to test their models and ask for any necessary pre-processing steps or output:
Links Checklist:
Links Checklist (some of these may overlap w/ Jerome's so maybe meet with him to discuss progress and what needs to be revisited or reviewed)
Webcam version of C++ node
Interconverter for benchmarking between:
TensorFlow to ONNX
PyTorch to ONNX
test more model architectures (found inside the dev model folder, test data and the model)
verify it works using online compiler
script for converting models to trt .engine file (can be python or C++, try links below)
Leaf diseases in vineyards are fungal, bacterial, or viral infections that affect the leaves of grapevines. These diseases can have a significant impact on vineyards and are of great importance to both vineyard owners and farmers for several reasons:
To address these challenges, vineyard owners and farmers employ various strategies, including disease-resistant grape varieties, integrated pest management (IPM) practices, regular monitoring, and the use of fungicides when necessary. Early detection and prevention are crucial for minimizing the impact of leaf diseases on vineyard operations and the quality of wine produced.
Leaf diseases in vineyards can be caused by various fungi, bacteria, and viruses. Some of the common types of leaf diseases that affect grapevines include:
Aim to only detect one leaf disease, but aim to do so very well and meet the requirements
Requirements:
Action Items:
The Nvidia Jetson Nano needs to be set up to run ROS 2 Foxy and support the Intel Realsense D455 camera.
Hardware
Software
For more information about setting up a Jetson Nano please see this link
For more information about installing ROS 2 Foxy on a Jetson please see this link
For more information about installing the Realsense Wrapper please see this link
Grape cluster detection is a computer vision and image processing task that involves identifying and locating grape clusters within vineyard images or videos. This technology is particularly important for vineyards and farmers for several reasons:
Grape cluster detection is typically achieved using computer vision techniques and machine learning algorithms that analyze images or videos captured in the vineyard. These systems can be automated and integrated into the overall vineyard management process, making them valuable tools for modern viticulture and wine production.
Requirements:
Action Items:
Please complete all items in this issue
Prerequisites:
Background Knowledge Required:
What We Want to Find Out
Python vs C++ ROS Node Performance
Objective:
The main objective of this experiment is to measure and analyze the performance differences between ROS2 Python and ROS2 C++ nodes when executing different neural networks. This information will help the team make informed decisions when choosing the language for their ROS2 projects involving neural networks.
Tasks:
Best Method of Building Nodes for Neural Networks
Objective:
The main objective of this issue is to foster a collaborative discussion on how to structure ROS2 nodes for neural networks in a way that achieves the following goals:
Tasks:
Best Method of Building Camera Nodes and Transferring Frames
Objective:
The primary objective of this issue is to encourage a collaborative discussion on how to structure ROS2 nodes for RGB-D cameras, with a focus on achieving the following goals:
Tasks:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.