CaneNexus (Hybrid Vision Rule Governed Intelligence Framework) is an advanced framework designed for industrial automation within sugarcane mills. This project integrates powerful neural net architectures, virtual twins, rule based decision graphs, and transformer based reasoning to intelligently automate milling processes.
It is specifically engineered to either operate alongside existing legacy systems (like physical sensors, Programmable Logic Controllers (PLCs), and Supervisory Control and Data Acquisition (SCADA) systems) or serve as a highly capable, cost effective alternative for mills where physical hardware automation is financially unfeasible.
The system operates across several distinct intelligent layers that process data from its raw state to actionable insights.
The structural vision layer of the framework. Deep learning computer vision models are used for real time visual processing of industrial states, visually tracking material flow like sugarcane anomalies and mechanical hardware metrics like steel pipe corrosion.
The deterministic logic layer. It successfully converts the visual inferences generated by the ViT into actionable workflows. It uses a robust, defined rule graph to simulate realistic PLC logic based purely on software inferred states.
The conversational artificial intelligence module. Powered by Google GenAI, this module bridges the gap between raw data and the end user. It interprets complex analytical logs, provides dynamic querying capabilities, and produces human readable reasoning for the automated decisions executed by the underlying graphs.
An end to end client application that visualizes the pipeline. It features real time metric dashboards, historical data logs, a conversational assistant, and a high throughput streaming simulator for validating industrial states continuously.
The repository is modularly organized to tightly separate logic domains.
Application/: The core source folder containing all executable application layers.backend/: The localized Python API encompassing the local endpoints, routing rules, deep learning inference pipelines, knowledge graph builders, and LLM queries.frontend/: The client side Angular application holding UI components, visualizers, state management, and the system design theme.
Datasets/: Unversioned root directory. Contains unprocessed industrial imagery and structured stream inputs.Models/: Unversioned root directory. Secures compiled neural network states and weight parameters for the DDA-ViT.Analyses/andResults/: Output directories for generated tracking charts, evaluation metrics, and general performance metadata.
The application must be configured and hosted from a local development environment. Visual Studio Code is the targeted environment for deploying this localized architecture.
- Visual Studio Code
- Python 3.10 or higher
- Node.js (LTS version)
- MongoDB (Running locally or via an established remote connection string)
Before running the application, please keep the following checklist in mind:
- Google Gemini API Key: You must generate your own API key from Google AI Studio and configure it in the backend for the conversational module to function correctly.
- MongoDB Database: Download and install MongoDB Community Server.
- It is recommended to download the Windows
.ziparchive and extract it to your preferred location. - Important: Whenever you start the application, remember to manually launch the database server by executing the
mongod.exefile located within your extracted MongoDBbindirectory.
- It is recommended to download the Windows
- Node.js Environment: Install the latest LTS release of Node.js (e.g., v24.14.1 LTS for Windows). Ensure
npmandchocolatey(if opted) are selected during the installation. - Follow Execution Steps: Once these dependencies are active, proceed closely with the Execution Steps detailed further below.
Because of strict .gitignore rules that prevent pushing excessively large files to GitHub, you must manually recreate the following directories at the root of the project to ensure the application avoids path structure runtime errors:
Datasets/: Create this folder and insert your uncompressed industrial test sets (e.g.,Steel/andSugar/subfolders).Models/: Create this folder and load your pre trained PyTorch.pthparameter files inside.
Open a new integrated terminal in Visual Studio Code at the root of the project.
Create and activate an isolated virtual runtime:
python -m venv venv
venv\Scripts\activateDeploy the foundational machine learning dependencies:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
pip install segmentation_models_pytorchInstall standard data and plotting utility modules:
pip install pandas matplotlib seabornInstall backend frameworks, local storage rules, and testing utilities:
pip install flask flask-cors pymongo pytestInstall network imaging graphs and external AI configurations:
pip install timm networkx opencv-python numpy Pillow
pip install google-genaiWith the backend intact, switch directory to Application/backend/ and execute your server script (such as app.py) to launch the local API.
Launch a secondary split terminal in Visual Studio Code. Ensure the backend terminal remains uninterrupted.
Navigate directly to the client source:
cd Application/frontendPull all necessary Node packaging dependencies:
npm installSpin up the Angular development server:
npm startThe system is now live. Open the local host port generated by the frontend server in your browser to begin testing.