### Initialize Single vs Multiple Image Performance Chart
Source: https://github.com/ai45lab/vlsbench/blob/main/index.html
Configures a bar chart to compare performance metrics across single and multiple image inputs for various vision-language models.
```javascript
const canvas_image = document.getElementById('single_vs_multiple_chart'); canvas_image.style.width = '500px'; canvas_image.style.height = '120px'; const svm = document.getElementById('single_vs_multiple_chart').getContext('2d'); const single_vs_multiple_chart = new Chart(svm, { type: 'bar', data: { labels: ['InternLM-XComposer2-VL', 'Yi-VL-34B', 'LLaVA-1.6-34B', 'InternVL-Chat-V1.2', 'VILA1.5', 'GPT-4V(ision) (Playground)'], datasets: [{ label: 'Single Image', data: [38.6, 42, 45.1, 46.9, 47, 56.1], backgroundColor: 'rgba(42, 149, 235, 0.6)', borderColor: 'rgba(42, 149, 235, 1)', borderWidth: 1, hoverBackgroundColor: 'rgba(42, 149, 235, 1)' }, { label: 'Multiple Image', data: [34.5, 36.6, 40, 38.4, 45.9, 51.7], backgroundColor: 'rgba(255, 153, 78, 0.6)', borderColor: 'rgba(255, 153, 78, 1)', borderWidth: 1, hoverBackgroundColor: 'rgba(255, 153, 78, 1)' }, { label: 'Overall', data: [38.2, 41.6, 44.7, 46.2, 46.9, 55.7], backgroundColor: 'rgba(110, 194, 134, 0.6)', borderColor: 'rgba(110, 194, 134, 1)', borderWidth: 1, hoverBackgroundColor: 'rgba(110, 194, 134, 1)' }] }, options: { scales: { y: { beginAtZero: true, min: 0, max: 80, ticks: { stepSize: 20, font: { size: 16 } } }, x: { ticks: { font: { size: 16 } } } }, plugins: { legend: { labels: { font: { size: 16 } } }, tooltip: { callbacks: { label: function(context) { return context.dataset.label + ': ' + context.parsed.y; } } } }, onHover: (event, chartElement) => { event.native.target.style.cursor = chartElement[0] ? 'pointer' : 'default'; } } });
```
--------------------------------
### Initialize VLSBench Bar Charts
Source: https://github.com/ai45lab/vlsbench/blob/main/index.html
These snippets initialize bar charts for various benchmark categories using Chart.js. Each chart requires a corresponding HTML canvas element with the specified ID.
```javascript
'LLaVA-1.6-34B', 'InternVL-Chat-V1.2', 'VILA1.5', 'GPT-4V'], datasets: [{ data: [20.0, 45.0, 25.0, 25.0, 45.0, 45, 30, 30, 30, 55.0], backgroundColor: ['rgba(196, 123, 160, 0.6)', 'rgba(245, 123, 113, 0.6)', 'rgba(255, 208, 80, 0.6)', 'rgba(110, 194, 134, 0.6)', 'rgba(255, 153, 78, 0.6)', 'rgba(42, 149, 235, 0.6)','rgba(183, 156, 220, 0.6)' ,'rgba(143, 169, 209, 0.6)' ,'rgba(72, 199, 176, 0.6)' ,'rgba(117, 209, 215, 0.6)'], borderColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,0.4)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'], hoverBackgroundColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,1)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'] } ] }; new Chart(document.getElementById('chart_DNASequences'), { type: 'bar', data: data_DNASequences , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
```javascript
// "data_Landscapes " chart const data_Landscapes = { labels: ['Adept Fuyu-8B', 'Qwen-VL-7B-Chat', 'InstructBLIP-T5-XXL', 'LLaVA-1.5-13B', 'BLIP-2 FLAN-T5-XXL', 'Yi-VL-34B', 'LLaVA-1.6-34B', 'InternVL-Chat-V1.2', 'VILA1.5', 'GPT-4V'], datasets: [{ data: [43.8, 43.8, 50.0, 31.2, 62.5, 50, 68.8, 62.5, 68.8, 68.8], backgroundColor: ['rgba(196, 123, 160, 0.6)', 'rgba(245, 123, 113, 0.6)', 'rgba(255, 208, 80, 0.6)', 'rgba(110, 194, 134, 0.6)', 'rgba(255, 153, 78, 0.6)', 'rgba(42, 149, 235, 0.6)','rgba(183, 156, 220, 0.6)' ,'rgba(143, 169, 209, 0.6)' ,'rgba(72, 199, 176, 0.6)' ,'rgba(117, 209, 215, 0.6)'], borderColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,0.4)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'], hoverBackgroundColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,1)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'] } ] }; new Chart(document.getElementById('chart_Landscapes'), { type: 'bar', data: data_Landscapes , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
```javascript
// "data_LogosAndBranding " chart const data_LogosAndBranding = { labels: ['Adept Fuyu-8B', 'Qwen-VL-7B-Chat', 'InstructBLIP-T5-XXL', 'LLaVA-1.5-13B', 'BLIP-2 FLAN-T5-XXL', 'Yi-VL-34B', 'LLaVA-1.6-34B', 'InternVL-Chat-V1.2', 'VILA1.5', 'GPT-4V'], datasets: [{ data: [21.4, 57.1, 64.3, 35.7, 50.0, 57.1, 78.6, 78.6, 71.4, 85.7], backgroundColor: ['rgba(196, 123, 160, 0.6)', 'rgba(245, 123, 113, 0.6)', 'rgba(255, 208, 80, 0.6)', 'rgba(110, 194, 134, 0.6)', 'rgba(255, 153, 78, 0.6)', 'rgba(42, 149, 235, 0.6)','rgba(183, 156, 220, 0.6)' ,'rgba(143, 169, 209, 0.6)' ,'rgba(72, 199, 176, 0.6)' ,'rgba(117, 209, 215, 0.6)'], borderColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,0.4)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'], hoverBackgroundColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,1)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'] } ] }; new Chart(document.getElementById('chart_LogosAndBranding'), { type: 'bar', data: data_LogosAndBranding , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
```javascript
// "data_Advertisements " chart const data_Advertisements = { labels: ['Adept Fuyu-8B', 'Qwen-VL-7B-Chat', 'InstructBLIP-T5-XXL', 'LLaVA-1.5-13B', 'BLIP-2 FLAN-T5-XXL', 'Yi-VL-34B', 'LLaVA-1.6-34B', 'InternVL-Chat-V1.2', 'VILA1.5', 'GPT-4V'], datasets: [{ data: [30.0, 60.0, 50.0, 60.0, 70.0, 80, 70, 80, 80, 100.0], backgroundColor: ['rgba(196, 123, 160, 0.6)', 'rgba(245, 123, 113, 0.6)', 'rgba(255, 208, 80, 0.6)', 'rgba(110, 194, 134, 0.6)', 'rgba(255, 153, 78, 0.6)', 'rgba(42, 149, 235, 0.6)','rgba(183, 156, 220, 0.6)' ,'rgba(143, 169, 209, 0.6)' ,'rgba(72, 199, 176, 0.6)' ,'rgba(117, 209, 215, 0.6)'], borderColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,0.4)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'], hoverBackgroundColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,1)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'] } ] };
```
--------------------------------
### Initialize VLSBench Performance Charts
Source: https://github.com/ai45lab/vlsbench/blob/main/index.html
These snippets use the Chart.js library to render bar charts comparing various vision-language models across different datasets. Each chart is bound to a specific DOM element ID and configured with custom scales and styling.
```javascript
new Chart(document.getElementById('chart_PathologicalImages'), { type: 'bar', data: data_PathologicalImages , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
```javascript
new Chart(document.getElementById('chart_MicroscopicImages'), { type: 'bar', data: data_MicroscopicImages , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
```javascript
new Chart(document.getElementById('chart_MRIsCTScansXrays'), { type: 'bar', data: data_MRIsCTScansXrays , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
--------------------------------
### Initialize VLSBench Bar Charts
Source: https://github.com/ai45lab/vlsbench/blob/main/index.html
These snippets initialize Chart.js bar charts for specific benchmark categories. Each chart requires a corresponding HTML canvas element with the specified ID.
```javascript
new Chart(document.getElementById('chart_SketchesAndDrafts'), { type: 'bar', data: data_SketchesAndDrafts , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
```javascript
new Chart(document.getElementById('chart_Maps'), { type: 'bar', data: data_Maps , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
```javascript
new Chart(document.getElementById('chart_TechnicalBlueprints'), { type: 'bar', data: data_TechnicalBlueprints , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
```javascript
new Chart(document.getElementById('chart_TreesAndGraphs'), {
```
--------------------------------
### Initialize Chart.js Bar Chart
Source: https://github.com/ai45lab/vlsbench/blob/main/index.html
Configures a bar chart with specific color palettes and axis constraints. Requires the Chart.js library to be loaded in the environment.
```javascript
220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'\], hoverBackgroundColor: \['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,1)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'\] }\] }; new Chart(document.getElementById('chart\_Advertisements'), { type: 'bar', data: data\_Advertisements , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } }); });
```
--------------------------------
### Evaluate MLLM Safety with VLSBench
Source: https://github.com/ai45lab/vlsbench/blob/main/README.md
Run the evaluation script by specifying the model architecture and data directory. Ensure the dataset is downloaded and the evaluation API key is configured before execution.
```bash
python eval.py --arch llava --data_root $ROOT_DIR --output_dir ./outputs
```
--------------------------------
### Initialize Benchmark Category Charts
Source: https://github.com/ai45lab/vlsbench/blob/main/index.html
Initializes bar charts for Diagrams, Tables, and Plots/Charts categories once the DOM content is loaded.
```javascript
document.addEventListener('DOMContentLoaded', function() { // Data for the "Diagrams" chart const data_Diagrams = { labels: ['Adept Fuyu-8B', 'Qwen-VL-7B-Chat', 'InstructBLIP-T5-XXL', 'LLaVA-1.5-13B', 'BLIP-2 FLAN-T5-XXL', 'Yi-VL-34B', 'LLaVA-1.6-34B', 'InternVL-Chat-V1.2', 'VILA1.5', 'GPT-4V'], datasets: [{ data: [27.6, 30.1, 31.8, 30.0, 32.0, 38.5, 40.8, 44.6, 42.8, 46.8], backgroundColor: ['rgba(196, 123, 160, 0.6)', 'rgba(245, 123, 113, 0.6)', 'rgba(255, 208, 80, 0.6)', 'rgba(110, 194, 134, 0.6)', 'rgba(255, 153, 78, 0.6)', 'rgba(42, 149, 235, 0.6)','rgba(183, 156, 220, 0.6)' ,'rgba(143, 169, 209, 0.6)' ,'rgba(72, 199, 176, 0.6)' ,'rgba(117, 209, 215, 0.6)'], borderColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,0.4)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'], hoverBackgroundColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,1)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'] }] }; // "data_Diagrams" chart new Chart(document.getElementById('chart_Diagrams'), { type: 'bar', data: data_Diagrams, options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } }); // "data_Tables" chart const data_Tables = { labels: ['Adept Fuyu-8B', 'Qwen-VL-7B-Chat', 'InstructBLIP-T5-XXL', 'LLaVA-1.5-13B', 'BLIP-2 FLAN-T5-XXL', 'Yi-VL-34B', 'LLaVA-1.6-34B', 'InternVL-Chat-V1.2', 'VILA1.5', 'GPT-4V'], datasets: [{ data: [26.6, 29.0, 29.8, 27.8, 27.8, 33.6, 40.2, 37.8, 39.9, 61.8], backgroundColor: ['rgba(196, 123, 160, 0.6)', 'rgba(245, 123, 113, 0.6)', 'rgba(255, 208, 80, 0.6)', 'rgba(110, 194, 134, 0.6)', 'rgba(255, 153, 78, 0.6)', 'rgba(42, 149, 235, 0.6)','rgba(183, 156, 220, 0.6)' ,'rgba(143, 169, 209, 0.6)' ,'rgba(72, 199, 176, 0.6)' ,'rgba(117, 209, 215, 0.6)'], borderColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,0.4)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'], hoverBackgroundColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,1)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'] }] }; new Chart(document.getElementById('chart_Tables'), { type: 'bar', data: data_Tables, options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } }); // "data_PlotsAndCharts " chart const data_PlotsAndCharts = { labels: ['Adept Fuyu-8B', 'Qwen-VL-7B-Chat', 'InstructBLIP-T5-XXL', 'LLaVA-1.5-13B', 'BLIP-2 FLAN-T5-XXL', 'Yi-VL-34B', 'LLaVA-1.6-34B', 'InternVL-Chat-V1.2', 'VILA1.5', 'GPT-4V'], datasets: [{ data: [24.8, 31.8, 36.2, 30.4, 35.8, 43.6, 44.9, 44.3, 47.6, 55.6],
```
--------------------------------
### Initialize VLSBench Bar Charts
Source: https://github.com/ai45lab/vlsbench/blob/main/index.html
These snippets define data objects and initialize Chart.js instances for various benchmark categories. Each chart uses a consistent color scheme and configuration for y-axis scaling and legend display.
```javascript
new Chart(document.getElementById('chart_Paintings'), { type: 'bar', data: data_Paintings , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
```javascript
const data_GeometricShapes = { labels: ['Adept Fuyu-8B', 'Qwen-VL-7B-Chat', 'InstructBLIP-T5-XXL', 'LLaVA-1.5-13B', 'BLIP-2 FLAN-T5-XXL', 'Yi-VL-34B', 'LLaVA-1.6-34B', 'InternVL-Chat-V1.2', 'VILA1.5', 'GPT-4V'], datasets: [{ data: [21.1, 25.3, 21.4, 25.6, 28.3, 31, 33.9, 35.7, 37.8, 40.2], backgroundColor: ['rgba(196, 123, 160, 0.6)', 'rgba(245, 123, 113, 0.6)', 'rgba(255, 208, 80, 0.6)', 'rgba(110, 194, 134, 0.6)', 'rgba(255, 153, 78, 0.6)', 'rgba(42, 149, 235, 0.6)','rgba(183, 156, 220, 0.6)' ,'rgba(143, 169, 209, 0.6)' ,'rgba(72, 199, 176, 0.6)' ,'rgba(117, 209, 215, 0.6)'], borderColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,0.4)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'], hoverBackgroundColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,1)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'] }] }; new Chart(document.getElementById('chart_GeometricShapes'), { type: 'bar', data: data_GeometricShapes , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
```javascript
const data_SheetMusic = { labels: ['Adept Fuyu-8B', 'Qwen-VL-7B-Chat', 'InstructBLIP-T5-XXL', 'LLaVA-1.5-13B', 'BLIP-2 FLAN-T5-XXL', 'Yi-VL-34B', 'LLaVA-1.6-34B', 'InternVL-Chat-V1.2', 'VILA1.5', 'GPT-4V'], datasets: [{ data: [35.2, 33.4, 34.6, 35.8, 34.9, 37.3, 33.1, 39.4, 37.6, 38.8], backgroundColor: ['rgba(196, 123, 160, 0.6)', 'rgba(245, 123, 113, 0.6)', 'rgba(255, 208, 80, 0.6)', 'rgba(110, 194, 134, 0.6)', 'rgba(255, 153, 78, 0.6)', 'rgba(42, 149, 235, 0.6)','rgba(183, 156, 220, 0.6)' ,'rgba(143, 169, 209, 0.6)' ,'rgba(72, 199, 176, 0.6)' ,'rgba(117, 209, 215, 0.6)'], borderColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,0.4)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'], hoverBackgroundColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,1)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'] }] }; new Chart(document.getElementById('chart_SheetMusic'), { type: 'bar', data: data_SheetMusic , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
```javascript
const data_MedicalImages = { labels: ['Adept Fuyu-8B', 'Qwen-VL-7B-Chat', 'InstructBLIP-T5-XXL', 'LLaVA-1.5-13B', 'BLIP-2 FLAN-T5-XXL', 'Yi-VL-34B', 'LLaVA-1.6-34B', 'InternVL-Chat-V1.2', 'VILA1.5', 'GPT-4V'], datasets: [{ data: [25.4, 29.8, 31.6, 36.4, 29.8, 47.8, 50.7, 52.6, 51.8, 59.6], backgroundColor: ['rgba(196, 123, 160, 0.6)', 'rgba(245, 123, 113, 0.6)', 'rgba(255, 208, 80, 0.6)', 'rgba(110, 194, 134, 0.6)', 'rgba(255, 153, 78, 0.6)', 'rgba(42, 149, 235, 0.6)','rgba(183, 156, 220, 0.6)' ,'rgba(143, 169, 209, 0.6)' ,'rgba(72, 199, 176, 0.6)' ,'rgba(117, 209, 215, 0.6)'], borderColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,0.4)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'], hoverBackgroundColor: ['rgba(196, 123, 160, 1)', 'rgba(245, 123, 113,1)', 'rgba(255, 208, 80, 1)', 'rgba(110, 194, 134, 1)', 'rgba(255, 153, 78, 1)', 'rgba(42, 149, 235, 1)','rgba(183, 156, 220, 1)' ,'rgba(143, 169, 209, 1)' ,'rgba(72, 199, 176, 1)' , 'rgba(117, 209, 215, 1)'] }] }; new Chart(document.getElementById('chart_MedicalImages'), { type: 'bar', data: data_MedicalImages , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
--------------------------------
### Render VLSBench Bar Charts
Source: https://github.com/ai45lab/vlsbench/blob/main/index.html
Initializes bar charts for various categories using Chart.js. Each snippet defines a dataset with specific labels, background colors, and performance metrics.
```javascript
new Chart(document.getElementById('chart_Portraits'), { type: 'bar', data: data_Portraits , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
```javascript
new Chart(document.getElementById('chart_Screenshots'), { type: 'bar', data: data_Screenshots , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
```javascript
new Chart(document.getElementById('chart_Other'), { type: 'bar', data: data_Other , options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20 } }, x: { display: false } }, plugins: { legend: { display: false }, tooltip: { } } } });
```
--------------------------------
### Frontend Interaction Scripts
Source: https://github.com/ai45lab/vlsbench/blob/main/index.html
JavaScript functions for toggling leaderboard text, handling table row resets, and initializing the difficulty level bar chart.
```javascript
function changeButtonText() { var button = document.getElementById('toggleButton'); if (button.innerHTML.includes("Validation Set Leaderboard")) { button.innerHTML = "Test Set Leaderboard (Click to Switch)"; } else { button.innerHTML = "Validation Set Leaderboard (Click to Switch)"; } } document.addEventListener('DOMContentLoaded', function() { var tables = document.querySelectorAll('table'); tables.forEach(function(table) { if (!table) return; var initialRows = Array.from(table.rows).slice(1); table.addEventListener('click', function(event) { var clickedCell = event.target.closest('td, th'); if (!clickedCell) return; var headerRow = clickedCell.parentNode; var columnIndex = Array.from(headerRow.cells).indexOf(clickedCell); var type = clickedCell.getAttribute('data-type'); if (headerRow.rowIndex === 0) { if (columnIndex === 0) { table.tBodies[0].innerHTML = ''; initialRows.forEach(row => table.tBodies[0].appendChild(row.cloneNode(true))); } } }); }); }); function toggleTables () { var table1 = document.getElementById('table1'); var table2 = document.getElementById('table2'); table1.classList.toggle('hidden'); table2.classList.toggle('hidden'); } document.getElementById('toggleButton').addEventListener('click', toggleTables); const canvas = document.getElementById('difficulty_level_chart'); canvas.style.width = '500px'; canvas.style.height = '120px'; const ctx = document.getElementById('difficulty_level_chart').getContext('2d'); const difficulty_level_chart = new Chart(ctx, { type: 'bar', data: { labels: ['Easy', 'Medium', 'Hard', 'Overall'], datasets: [{ label: 'Adept Fuyu-8B', data: [28.9, 27, 26.4, 27.4], backgroundColor: 'rgba(196, 123, 160, 0.6)', borderColor: 'rgba(196, 123, 160, 1)', borderWidth: 1, hoverBackgroundColor: 'rgba(196, 123, 160, 1)' }, { label: 'Qwen-VL-7B-Chat', data: [39.4, 31.9, 27.6, 32.9], backgroundColor: 'rgba(245, 123, 113, 0.6)', borderColor: 'rgba(245, 123, 113, 1)', borderWidth: 1, hoverBackgroundColor: 'rgba(245, 123, 113, 1)' }, { label: 'LLaVA-1.5-13B', data: [41.3, 32.7, 26.7, 33.6], backgroundColor: 'rgba(255, 208, 80, 0.6)', borderColor: 'rgba(255, 208, 80, 1)', borderWidth: 1, hoverBackgroundColor: 'rgba(255, 208, 80, 1)' }, { label: 'InstructBLIP-T5-XXL', data: [40.3, 32.3, 29.4, 33.8], backgroundColor: 'rgba(110, 194, 134, 0.6)', borderColor: 'rgba(110, 194, 134, 1)', borderWidth: 1, hoverBackgroundColor: 'rgba(110, 194, 134, 1)' }, { label: 'BLIP-2 FLAN-T5-XXL', data: [41, 32.7, 28.5, 34], backgroundColor: 'rgba(255, 153, 78, 0.6)', borderColor: 'rgba(255, 153, 78, 1)', borderWidth: 1, hoverBackgroundColor: 'rgba(255, 153, 78, 1)' }, { label: 'Yi-VL-34B', data: [51.0, 39.9, 34.0, 41.6], backgroundColor: 'rgba(42, 149, 235, 0.6)', borderColor: 'rgba(42, 149, 235, 1)', borderWidth: 1, hoverBackgroundColor: 'rgba(42, 149, 235, 1)' }, { label: 'LLaVA-1.6-34B', data: [56.1, 43.4, 34.4, 44.7], backgroundColor: 'rgba(183, 156, 220, 0.6)', borderColor: 'rgba(183, 156, 220, 1)', borderWidth: 1, hoverBackgroundColor: 'rgba(183, 156, 220, 1)' }, { label: 'InternVL-Chat-V1.2', data: [56.2, 44.8, 37.8, 46.2], backgroundColor: 'rgba(143, 169, 209, 0.6)', borderColor: 'rgba(143, 169, 209, 1)', borderWidth: 1, hoverBackgroundColor: 'rgba(143, 169, 209, 1)' }, { label: 'VILA1.5', data: [58.1, 45.5, 36.8, 46.9], backgroundColor: 'rgba(172, 199, 176, 0.6)', borderColor: 'rgba(172, 199, 176, 1)', borderWidth: 1, hoverBackgroundColor: 'rgba(172, 199, 176, 1)' }, { label: 'GPT-4V(ision) (Playground)', data: [76.1, 55.6, 31.2, 55.7], backgroundColor: 'rgba(117, 209, 215, 0.6)', borderColor: 'rgba(117, 209, 215, 1)', borderWidth: 1, hoverBackgroundColor: 'rgba(117, 209, 215, 1)' }] }, options: { scales: { y: { beginAtZero: true, min: 0, max: 100, ticks: { stepSize: 20, font: { size: 16 } } }, x: { ticks: { font: { size: 16 } } } }, plugins: { legend: { labels: { font: { size: 16 } } }, tooltip: { callbacks: { label: function(context) { return context.dataset.label + ': ' +
```