A visualization structure analysis tool combining Next.js frontend with OpenCV-powered FastAPI backend.
ViStruct is a visualization tool that connects with a FastAPI backend server for processing and analyzing visual data. The client provides an interactive interface for users to work with visualization structures.
Watch ViStruct in action:
- Node.js version 20.0 or higher
- npm version 25.0 or higher
- Clone the repository
- Install dependencies:
npm install- Create a
.env.localfile in the client folder with:
NEXT_PUBLIC_API_URL=http://localhost:8000
Start the development server:
npm run devThis uses turbopack for faster development builds. The application will be available at http://localhost:3000.
Build the application:
npm run buildStart the production server:
npm run startThe client communicates with a FastAPI server. To run the full stack:
cd ../server-
Start the backend server first (from the server directory):
uvicorn main:app --reload
-
Then start the frontend client (from the client directory):
npm run dev
- Integration with Google Generative AI
- Monaco Editor for code visualization
- Axios for API communication with backend
- HTML to canvas conversion for visualization capturing
- Icon-rich interface with React Icons
- Screenshot capture and processing with html2canvas
- Communication with OpenCV-powered backend for visualization analysis
- Server: https://server-silent-dew-747-fast-api.fly.dev
- Client: https://vi-struct-prkmwfhrd-hive-labs-projects.vercel.app/
The ViStruct client works with the server's OpenCV-based visualization analysis system:
- Screenshot Capture: The client can capture screenshots of visualizations using html2canvas
- Image Analysis: Captured images are sent to the backend server where OpenCV processes them
- Component Detection: The system detects visualization components like:
- Chart axes, titles, and legends
- Bar charts, scatter plots, and bubble charts
- Treemap labels and components
- Pie chart slices and other visualization elements
- Interactive Mapping: Users can map detected regions to meaningful data entities
- Structure Analysis: The system provides structural analysis of visualizations
This allows users to analyze, understand, and work with various visualization structures directly in the browser.
ViStruct has undergone rigorous evaluation to ensure its effectiveness and usability:
Twenty visualization experts evaluated ViStruct to assess its:
- Visualization decomposition accuracy
- Semantic region identification
- Visual attention cues effectiveness
- Feature comprehensiveness
The expert evaluation data and findings are available in the evaluations/expert-review.zip folder.
A comprehensive performance evaluation was conducted involving:
- 45 distinct visualization tasks
- 5 trials per task
This evaluation measured ViStruct's effectiveness across diverse visualization scenarios from VLAT and Mini-VLAT. The complete performance evaluation data can be found in the evaluations/performance_evaluation.zip folder.