🌱 Recent Projects
grapeleafGPT
grapeleafGPT is an advanced AI model designed to detect Esca disease in grape leaves while also providing vineyard workers with actionable advice on safe vineyard practices. Building on the capabilities of MiniGPT-4 and LLaVA, grapeleafGPT combines image analysis with interactive language support. While traditional LVLMs excel at recognizing common objects, they often lack specific domain expertise and the ability to understand fine-grained details, which is critical for specialized tasks like disease detection in viticulture. grapeleafGPT addresses these challenges by fine-tuning the model to understand the unique visual signatures of Esca disease, offering a comprehensive tool for anomaly detection in vineyards. Additionally, the appl eliminates the need for manual threshold setting by directly assessing the presence and severity of anomalies, and providing detailed advice through a multi-turn dialogue system.
Model
grapeleafGPT is a novel approach to anomaly detection in viticulture, leveraging a pre-trained image encoder and a Large Language Model (LLM) to inform vineyard staff of Esca infection. The model employs a visual-textual feature-matching-based image decoder for accurate localization of infected areas and a prompt learner to fine-tune the LVLM for domain-specific applications.
The model was trained using a custom dataset class which handled grape leaf images by converting them into tensors, resizing each image, and applying normalization. Training focused on a single class, with a specific emphasis on distinguishing healthy leaves from those showing Esca symptoms. Gradient accumulation steps were set to 16, and the learning rate was controlled using a WarmupDecayLR scheduler, which ramped the learning rate from 0 to 0.0001 over 100 steps and decayed it over 20,000 steps. Gradient clipping was applied to maintain stability, and mixed precision training utilized FP16 and BF16 to improve computational efficiency. Masks were generated using HSV color space conversion via OpenCV, with specific color ranges defined for red-brown hues to isolate Esca symptoms.
The final model achieved an image-level Area Under the Curve (AUC) of 94.9%, meaning that it exhibited a 94.9% probability of correctly ranking a randomly chosen Esca-infected leaf higher in anomaly score than a randomly chosen healthy leaf, indicating robust performance in distinguishing between the two classes.
Capabilities
-
Automatically identifies the presence of Esca disease in grape leaf images, highlighting the exact locations of the most prominent infection symptoms.
-
Engages in multi-turn dialogues with vineyard workers, offering advice on safe practices, treatment options, and preventative measures.
-
Unlike traditional image classifiers, grapeleafGPT does not require manual threshold setting, streamlining the detection process and improving usability in practical vineyard environments.
-
Capable of detecting anomalies in previously unseen grape leaf samples with minimal normal examples provided, ensuring robust performance across diverse conditions.
Southwest Michigan Wine Portal
https://www.lakemichiganshore.wine/
My family has a long history in Van Buren County, and I am proud to showcase the region. Here, I built and maintain a web application dedicated to showcasing the Lake Michigan Shore and Fennville American Viticultural Areas (AVA) in Southwest Michigan. The application is designed for a user persona with a deep interest in wine and viticulture, offering a one-stop location to dive into the region's AVAs, history, wineries, and hybrid and vinifera grape varieties. Included are multiple data visualizations on the regions common grape varieties and suitability for quality wine growing.
The custom ChatBot component is designed to provide users with tailored wine education and tourism information. When a user submits a query, the component sends the message to the OpenAI API endpoint that processes the input and returns a context-specific response. This response is enhanced using Fuse.js, a fuzzy search library, which matches the user’s query against a self-curated database of regional wineries and grape varieties. The database includes key information such as winery names, addresses, and descriptions, which Fuse.js uses to identify the most relevant results. If a match is found, the bot dynamically adjusts its response to include specific winery details, ensuring that users receive accurate and personalized recommendations. This seamless integration of API communication and fuzzy search within the component provides a robust and informative experience for users interested in exploring the wine offerings of Southwest Michigan.
U.S. Export/Import
Market Analysis
Does the US Wine Industry Have an Export Problem?
The US wine industry, particularly in California, has been facing significant challenges since 2023, with many producers struggling financially. While there are multiple factors contributing to the current market situation, one hypothesis worth exploring is the declining export performance of US wines in the context of a rapidly globalizing wine market.
Two Graphs: US vs. the World
As of 2023, the US is now importing approximately 1.2 million kiloliters (KL) of wine, a surprisingly substantial increase from the 0.4 million KL in 2000. This growth in imports suggests a strong demand for international wines within the US, likely driven by consumers' desire for new taste experiences (and lower prices). Simultaneously, the percentage of wine imports as a proportion of total wine consumption in the US has also steadily increased, now hovering around 40%.
However, what is particularly striking is the trend in US wine exports. The total production volume that is exported has seen a significant decline over the same period. By 2023, the percentage of wine produced in the US that is exported has dropped to around 10%, down from a more stable rate in the early 2000s, which peaked in 2008 at 24%. This sharp decrease appears even more profound when compared to the global statistics.
The second chart provides the global perspective, showing that worldwide, like in the US, both wine imports and imports as a percentage of consumption have generally been on an upward trajectory. However, the world data suggests that most countries have continued to match rising imports with an increase in wine exports. The percentage of global wine production that is exported has consistently risen or remained stable since 2000.
This trend suggests that as the world wine market becomes more globalized, there is a rising preference among consumers worldwide for diverse wine options, but US exports are not following this global pattern; instead, they are on the decline.
Consequences for US Wineries
This divergence in export trends could be a key reason for the plummeting sales experienced by many US wineries, particularly in California. If the global wine market is increasingly demanding a wider variety of wines from different regions, the declining export performance of US wines might indicate that they are rapidly losing their competitive edge. Small US producers especially need to face the reality that Americans are not only preferring imported wines more than ever, they also have access to more foreign wines than any time in the last 25 years.
One could argue that global consumers are either shunning US wines intentionally or being priced out of the market. The declining export percentages may point to several possible issues: a mismatch between US wine styles and global consumer preferences, or perhaps the notoriously high prices of California wines, which could be pushing buyers towards more competitively priced alternatives from other regions.
Where to Look Next
Are US wines being overshadowed by more affordable or better-marketed wines from other regions? Is the decline in exports due to stylistic preferences, where global consumers prefer the profiles offered by wines from other countries? Or is it primarily an issue of pricing, with US wines, especially those from California, priced out of reach for many international consumers?
Data Source: Anderson, K. and V. Pinilla (with the assistance of A.J. Holmes), Annual Database of Global Wine Markets, 1835 to 2023, University of Adelaide’s Wine Economics Research Centre, August 2024.
Organic Wine Additives
Data Visualization
This React application provides a dynamic visualization of organic wine additives available per the Institut Oenologique de Champagne, allowing users to interactively explore various additive categories. The app employs a combination of React hooks and the Matter.js physics engine to animate and simulate the movement of "additives," each representing a different product within the selected category. As users select or deselect categories, the app dynamically adds or removes these visual elements from the canvas. The use of Matter.js for physics simulation ensures that the visualization feels natural and interesting, with each additive's behavior on the canvas being influenced by the underlying physics model. Full information on each additive is available by clicking the small card added to the canvas.
View the Demo below or visit https://organic-additive-viz.vercel.app/ for the full visualization.
Bordeaux Remote Imaging
CubeSat Orbit Plan
Description coming soon...