Duplicate from Tetrabot2026/InspecSafe-V1
Browse filesCo-authored-by: tetrabot <tetrabot@users.noreply.huggingface.co>
- README.md +135 -0
- dataset_loader.py +387 -0
- model_api_generate_results.py +208 -0
- model_benchmark_evaluation.py +140 -0
- model_confusion_matrix.py +138 -0
- test.tar.gz +3 -0
- train.tar.gz +3 -0
README.md
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: cc-by-4.0
|
| 5 |
+
tags:
|
| 6 |
+
- multiple-modality
|
| 7 |
+
- industrial-scene
|
| 8 |
+
- custom-dataset
|
| 9 |
+
size_categories:
|
| 10 |
+
- 10G<n<100G
|
| 11 |
+
source_datasets:
|
| 12 |
+
- original
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# InspecSafe-V1
|
| 16 |
+
|
| 17 |
+
## Overview
|
| 18 |
+
|
| 19 |
+
**InspecSafe-V1** is a high-quality, multimodal annotated dataset designed for **world model construction and analysis in industrial environments**. The data was collected from real-world inspection robots deployed across industrial sites and has been carefully cleaned and standardized for research and applications in predictive world modeling for industrial scenarios.
|
| 20 |
+
|
| 21 |
+
The dataset covers five representative industrial settings: tunnels, power facilities, sintering equipment, oil/gas/chemical plants, and coal conveyor galleries. It was constructed using data from 41 wheeled or rail-mounted inspection robots operating at 2,239 valid inspection waypoints. Across the dataset, multimodal records may include visible-light video, infrared video, audio, depth or LiDAR point clouds, gas concentration readings, temperature, and humidity. Depending on the inspection robot, sensing configuration, and waypoint conditions, each inspection waypoint is associated with the available subset of these modalities rather than necessarily containing all modality types.
|
| 22 |
+
The available modality types include:
|
| 23 |
+
|
| 24 |
+
- Visible-light video
|
| 25 |
+
- Infrared video
|
| 26 |
+
- Audio
|
| 27 |
+
- Depth or LiDAR point clouds
|
| 28 |
+
- Gas concentration readings
|
| 29 |
+
- Temperature
|
| 30 |
+
- Humidity
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
Additionally, pixel-level polygonal segmentation annotations are provided for industrial objects in visible-light images. To support downstream tasks, each sample is also accompanied by a semantic scene description and a corresponding safety-level label based on real inspection protocols.
|
| 34 |
+
|
| 35 |
+
## Dataset Format
|
| 36 |
+
|
| 37 |
+
The dataset is divided into a training set and a test set, both of which are organized in a structured directory layout with aligned multimodal streams and annotations. An overview of the data structure is shown below:
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
```
|
| 41 |
+
DATA_PATH
|
| 42 |
+
├── train
|
| 43 |
+
│ ├── Annotations
|
| 44 |
+
│ │ ├── Normal_data
|
| 45 |
+
│ │ │ ├── coal_conveyor-Level04-SuspendedRail-000560
|
| 46 |
+
│ │ │ │ ├── coal_conveyor-Level04-SuspendedRail-000560-001.jpg
|
| 47 |
+
│ │ │ │ ├── coal_conveyor-Level04-SuspendedRail-000560-001.json
|
| 48 |
+
│ │ │ │ └── coal_conveyor-Level04-SuspendedRail-000560-001.txt
|
| 49 |
+
│ │ │ └── ...
|
| 50 |
+
│ │ └── Anomaly_data
|
| 51 |
+
│ │ ├── coal_conveyor-Level01-SuspendedRail-002486
|
| 52 |
+
│ │ │ ├── coal_conveyor-Level01-SuspendedRail-002486-001.jpg
|
| 53 |
+
│ │ │ ├── coal_conveyor-Level01-SuspendedRail-002486-001.json
|
| 54 |
+
│ │ │ └── coal_conveyor-Level01-SuspendedRail-002486-001.txt
|
| 55 |
+
│ │ └── ...
|
| 56 |
+
│ ├── Other_modalities
|
| 57 |
+
│ │ ├── coal_conveyor-Level04-SuspendedRail-000560
|
| 58 |
+
│ │ │ ├── coal_conveyor-Level04-SuspendedRail-000560-visible.mp4
|
| 59 |
+
│ │ │ ├── coal_conveyor-Level04-SuspendedRail-000560-infrared.mp4
|
| 60 |
+
│ │ │ ├── coal_conveyor-Level04-SuspendedRail-000560-sensor.txt
|
| 61 |
+
│ │ │ ├── coal_conveyor-Level04-SuspendedRail-000560-point_cloud.bag
|
| 62 |
+
│ │ │ └── coal_conveyor-Level04-SuspendedRail-000560-audio.wav
|
| 63 |
+
│ │ └── ...
|
| 64 |
+
│ └── Parameters
|
| 65 |
+
│ ├── Hardware
|
| 66 |
+
│ ├── Device_A.json
|
| 67 |
+
│ ├── Device_B.json
|
| 68 |
+
│ └── ...
|
| 69 |
+
└── test
|
| 70 |
+
├── Annotations
|
| 71 |
+
│ ├── Normal_data
|
| 72 |
+
│ │ ├── coal_conveyor-Level04-SuspendedRail-000001
|
| 73 |
+
│ │ │ ├── coal_conveyor-Level04-SuspendedRail-000001-001.jpg
|
| 74 |
+
│ │ │ ├── coal_conveyor-Level04-SuspendedRail-000001-001.json
|
| 75 |
+
│ │ │ └── coal_conveyor-Level04-SuspendedRail-000001-001.txt
|
| 76 |
+
│ │ └── ...
|
| 77 |
+
│ └── Anomaly_data
|
| 78 |
+
│ ├── coal_conveyor-Level01-SuspendedRail-002235
|
| 79 |
+
│ │ ├── coal_conveyor-Level01-SuspendedRail-002235-001.jpg
|
| 80 |
+
│ │ ├── coal_conveyor-Level01-SuspendedRail-002235-001.json
|
| 81 |
+
│ │ └── coal_conveyor-Level01-SuspendedRail-002235-001.txt
|
| 82 |
+
│ └── ...
|
| 83 |
+
├── Other_modalities
|
| 84 |
+
│ ├── coal_conveyor-Level04-SuspendedRail-000001
|
| 85 |
+
│ │ ├── coal_conveyor-Level04-SuspendedRail-000001-visible.mp4
|
| 86 |
+
│ │ ├── coal_conveyor-Level04-SuspendedRail-000001-infrared.mp4
|
| 87 |
+
│ │ ├── coal_conveyor-Level04-SuspendedRail-000001-sensor.txt
|
| 88 |
+
│ │ ├── coal_conveyor-Level04-SuspendedRail-000001-point_cloud.bag
|
| 89 |
+
│ │ └── coal_conveyor-Level04-SuspendedRail-000001-audio.wav
|
| 90 |
+
│ └── ...
|
| 91 |
+
└── Parameters
|
| 92 |
+
├── Hardware
|
| 93 |
+
├── Device_A.json
|
| 94 |
+
├── Device_B.json
|
| 95 |
+
└── ...
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
### Notes:
|
| 100 |
+
- **Inspection point identifier**: Each folder name represents an inspection point, such as `coal_conveyor-Level04-SuspendedRail-000560`. The same identifier is used in both the `Annotations` and `Other_modalities` folders to enable cross-modal correspondence.
|
| 101 |
+
- **Inspection instances**: A single inspection point may contain multiple inspection instances. In the `Annotations` folder, these instances are distinguished by numerical suffixes appended to the filenames, such as `-001`, `-002`, and `-003`.
|
| 102 |
+
- **Annotations**:
|
| 103 |
+
- `.jpg`: Visible-light image frame for the corresponding inspection instance.
|
| 104 |
+
- `.json`: Pixel-level polygonal segmentation annotations and related metadata.
|
| 105 |
+
- `.txt`: Human-readable semantic description of the scene.
|
| 106 |
+
- **Other modalities**:
|
| 107 |
+
- `.mp4`: Visible-light and infrared videos.
|
| 108 |
+
- `.txt`: Sensor logs, including gas concentration, temperature, and humidity.
|
| 109 |
+
- `.bag`: Point-cloud data in ROS bag format.
|
| 110 |
+
- `.wav`: Audio recordings.
|
| 111 |
+
- **Parameters**: The `Parameters` folder contains hardware specifications, software settings, and calibration-related files used to support multimodal interpretation and fusion.
|
| 112 |
+
> This structure ensures synchronized access across all modalities and supports both supervised learning and world modeling tasks. Each sample metadata (e.g., robot ID, location, timestamp, safety label) is stored in JSON format. Segmentation masks are provided as PNG images with instance IDs matching the annotation JSON.
|
| 113 |
+
|
| 114 |
+
The shared inspection point identifier allows the multimodal and sensory records in `Other_modalities` to be linked to one or more annotated inspection instances in `Annotations`.
|
| 115 |
+
|
| 116 |
+
## Data Splits
|
| 117 |
+
|
| 118 |
+
| Split | Number of Samples |
|
| 119 |
+
|---------|-------------------|
|
| 120 |
+
| train | 3,763 |
|
| 121 |
+
| test | 1,250 |
|
| 122 |
+
|
| 123 |
+
> Note: The dataset does not include a separate validation split; users are encouraged to create one from the training set as needed.
|
| 124 |
+
|
| 125 |
+
## License
|
| 126 |
+
|
| 127 |
+
This dataset is released under the [CC-BY-4.0 License](https://creativecommons.org/licenses/by/4.0/).
|
| 128 |
+
|
| 129 |
+
## Acknowledgements
|
| 130 |
+
|
| 131 |
+
We thank the multimodal recognition algorithm team who contributed to data collection and annotation. This work was supported by TetraBOT.
|
| 132 |
+
|
| 133 |
+
---
|
| 134 |
+
|
| 135 |
+
For questions or contributions, please open an issue in the repository.
|
dataset_loader.py
ADDED
|
@@ -0,0 +1,387 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Multimodal Robot Anomaly Detection Dataset Loader
|
| 3 |
+
Data Path Structure:
|
| 4 |
+
DATA_PATH/
|
| 5 |
+
├── train/
|
| 6 |
+
│ ├── Annotations/
|
| 7 |
+
│ │ ├── Normal_data/
|
| 8 |
+
│ │ │ └── {point_name}/
|
| 9 |
+
│ │ │ ├── {point_name}_visible_{timestamp}_frame_{frame_id}.jpg
|
| 10 |
+
│ │ │ ├── {point_name}_visible_{timestamp}_frame_{frame_id}.json
|
| 11 |
+
│ │ │ └── {point_name}_visible_{timestamp}_frame_{frame_id}.txt
|
| 12 |
+
│ │ └── Anomaly_data/
|
| 13 |
+
│ │ └── {anomaly_name}/
|
| 14 |
+
│ │ ├── {anomaly_name}.jpg
|
| 15 |
+
│ │ ├── {anomaly_name}.json
|
| 16 |
+
│ │ └── {anomaly_name}.txt
|
| 17 |
+
│ ├── Other_modalities/
|
| 18 |
+
│ │ └── {point_name}/
|
| 19 |
+
│ │ ├── {point_name}_visible_{timestamp}.mp4
|
| 20 |
+
│ │ ├── {point_name}_infrared_{timestamp}.mp4
|
| 21 |
+
│ │ ├── {point_name}_sensor_{timestamp}.txt
|
| 22 |
+
│ │ ├── {point_name}_point_cloud_{timestamp}.bag
|
| 23 |
+
│ │ └── {point_name}_audio_{timestamp}.wav
|
| 24 |
+
│ └── Parameters/
|
| 25 |
+
│ ├── Hardware/
|
| 26 |
+
│ └── Device_*.json
|
| 27 |
+
└── test/
|
| 28 |
+
└── (same structure as train)
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
import os
|
| 32 |
+
import json
|
| 33 |
+
from pathlib import Path
|
| 34 |
+
from dataclasses import dataclass, field
|
| 35 |
+
from typing import Optional, List, Dict, Any, Tuple, Literal
|
| 36 |
+
from enum import Enum
|
| 37 |
+
import torch
|
| 38 |
+
from torch.utils.data import Dataset
|
| 39 |
+
import cv2
|
| 40 |
+
import numpy as np
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
class DataSplit(Enum):
|
| 44 |
+
TRAIN = "train"
|
| 45 |
+
TEST = "test"
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
class DataType(Enum):
|
| 49 |
+
NORMAL = "Normal_data"
|
| 50 |
+
ANOMALY = "Anomaly_data"
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
@dataclass
|
| 54 |
+
class ImageAnnotation:
|
| 55 |
+
"""Image annotation data structure."""
|
| 56 |
+
image_path: str
|
| 57 |
+
json_path: str
|
| 58 |
+
txt_path: str
|
| 59 |
+
label: int # 0 for normal, 1 for anomaly
|
| 60 |
+
data_type: DataType
|
| 61 |
+
point_name: str
|
| 62 |
+
frame_id: Optional[str] = None
|
| 63 |
+
metadata: Dict[str, Any] = field(default_factory=dict)
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
@dataclass
|
| 67 |
+
class MultimodalData:
|
| 68 |
+
"""Multimodal data for a collection point."""
|
| 69 |
+
point_name: str
|
| 70 |
+
rgb_video_path: Optional[str] = None
|
| 71 |
+
infrared_video_path: Optional[str] = None
|
| 72 |
+
sensor_data_path: Optional[str] = None
|
| 73 |
+
point_cloud_path: Optional[str] = None
|
| 74 |
+
audio_path: Optional[str] = None
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
class MultimodalRobotDataset(Dataset):
|
| 78 |
+
"""
|
| 79 |
+
Multimodal Robot Anomaly Detection Dataset.
|
| 80 |
+
|
| 81 |
+
Supports:
|
| 82 |
+
- Loading normal and anomaly images with annotations
|
| 83 |
+
- Loading multimodal data (RGB, infrared, sensor, point cloud, audio)
|
| 84 |
+
- Loading device parameters
|
| 85 |
+
"""
|
| 86 |
+
|
| 87 |
+
def __init__(
|
| 88 |
+
self,
|
| 89 |
+
root_path: str,
|
| 90 |
+
split: DataSplit = DataSplit.TRAIN,
|
| 91 |
+
data_type: Optional[DataType] = None, # None means both
|
| 92 |
+
transform=None,
|
| 93 |
+
load_multimodal: bool = False,
|
| 94 |
+
load_parameters: bool = False,
|
| 95 |
+
):
|
| 96 |
+
"""
|
| 97 |
+
Initialize the dataset.
|
| 98 |
+
|
| 99 |
+
Args:
|
| 100 |
+
root_path: Root path to DATA_PATH directory
|
| 101 |
+
split: DataSplit.TRAIN or DataSplit.TEST
|
| 102 |
+
data_type: Filter by DataType, None means load all
|
| 103 |
+
transform: Optional transform to apply to images
|
| 104 |
+
load_multimodal: Whether to load multimodal data paths
|
| 105 |
+
load_parameters: Whether to load device parameters
|
| 106 |
+
"""
|
| 107 |
+
self.root_path = Path(root_path)
|
| 108 |
+
self.split = split
|
| 109 |
+
self.data_type = data_type
|
| 110 |
+
self.transform = transform
|
| 111 |
+
self.load_multimodal = load_multimodal
|
| 112 |
+
self.load_parameters = load_parameters
|
| 113 |
+
|
| 114 |
+
self.annotations: List[ImageAnnotation] = []
|
| 115 |
+
self.multimodal_data: Dict[str, MultimodalData] = {}
|
| 116 |
+
self.device_parameters: Dict[str, Any] = {}
|
| 117 |
+
|
| 118 |
+
self._scan_dataset()
|
| 119 |
+
|
| 120 |
+
if self.load_parameters:
|
| 121 |
+
self._load_parameters()
|
| 122 |
+
|
| 123 |
+
def _scan_dataset(self):
|
| 124 |
+
"""Scan and collect all annotation files."""
|
| 125 |
+
split_path = self.root_path / self.split.value
|
| 126 |
+
annotation_path = split_path / "Annotations"
|
| 127 |
+
|
| 128 |
+
data_types = [self.data_type] if self.data_type else [DataType.NORMAL, DataType.ANOMALY]
|
| 129 |
+
|
| 130 |
+
for dtype in data_types:
|
| 131 |
+
dtype_path = annotation_path / dtype.value
|
| 132 |
+
if not dtype_path.exists():
|
| 133 |
+
continue
|
| 134 |
+
|
| 135 |
+
for point_dir in dtype_path.iterdir():
|
| 136 |
+
if not point_dir.is_dir():
|
| 137 |
+
continue
|
| 138 |
+
|
| 139 |
+
point_name = point_dir.name
|
| 140 |
+
|
| 141 |
+
# Find all image files
|
| 142 |
+
for img_file in point_dir.glob("*.jpg"):
|
| 143 |
+
json_file = img_file.with_suffix(".json")
|
| 144 |
+
txt_file = img_file.with_suffix(".txt")
|
| 145 |
+
|
| 146 |
+
# Extract frame_id from filename
|
| 147 |
+
frame_id = self._extract_frame_id(img_file.name)
|
| 148 |
+
|
| 149 |
+
annotation = ImageAnnotation(
|
| 150 |
+
image_path=str(img_file),
|
| 151 |
+
json_path=str(json_file) if json_file.exists() else "",
|
| 152 |
+
txt_path=str(txt_file) if txt_file.exists() else "",
|
| 153 |
+
label=0 if dtype == DataType.NORMAL else 1,
|
| 154 |
+
data_type=dtype,
|
| 155 |
+
point_name=point_name,
|
| 156 |
+
frame_id=frame_id,
|
| 157 |
+
)
|
| 158 |
+
self.annotations.append(annotation)
|
| 159 |
+
|
| 160 |
+
# Sort by point name for consistent ordering
|
| 161 |
+
self.annotations.sort(key=lambda x: (x.data_type.value, x.point_name, x.frame_id or ""))
|
| 162 |
+
|
| 163 |
+
# Load multimodal data if requested
|
| 164 |
+
if self.load_multimodal:
|
| 165 |
+
self._scan_multimodal_data()
|
| 166 |
+
|
| 167 |
+
def _extract_frame_id(self, filename: str) -> Optional[str]:
|
| 168 |
+
"""Extract frame ID from filename."""
|
| 169 |
+
# Pattern: *_frame_000001.jpg or frame_000001.jpg
|
| 170 |
+
if "_frame_" in filename:
|
| 171 |
+
parts = filename.replace(".jpg", "").split("_frame_")
|
| 172 |
+
return parts[-1] if len(parts) > 1 else None
|
| 173 |
+
elif filename.startswith("frame_"):
|
| 174 |
+
return filename.replace(".jpg", "").replace("frame_", "")
|
| 175 |
+
return None
|
| 176 |
+
|
| 177 |
+
def _scan_multimodal_data(self):
|
| 178 |
+
"""Scan and collect multimodal data paths."""
|
| 179 |
+
split_path = self.root_path / self.split.value
|
| 180 |
+
multimodal_path = split_path / "Other_modalities"
|
| 181 |
+
|
| 182 |
+
if not multimodal_path.exists():
|
| 183 |
+
return
|
| 184 |
+
|
| 185 |
+
for point_dir in multimodal_path.iterdir():
|
| 186 |
+
if not point_dir.is_dir():
|
| 187 |
+
continue
|
| 188 |
+
|
| 189 |
+
point_name = point_dir.name
|
| 190 |
+
mm_data = MultimodalData(point_name=point_name)
|
| 191 |
+
|
| 192 |
+
for file in point_dir.iterdir():
|
| 193 |
+
if "_visible_" in file.name and file.suffix == ".mp4":
|
| 194 |
+
mm_data.rgb_video_path = str(file)
|
| 195 |
+
elif "_infrared_" in file.name and file.suffix == ".mp4":
|
| 196 |
+
mm_data.infrared_video_path = str(file)
|
| 197 |
+
elif "_sensor_" in file.name and file.suffix == ".txt":
|
| 198 |
+
mm_data.sensor_data_path = str(file)
|
| 199 |
+
elif "_point_cloud_" in file.name and file.suffix == ".bag":
|
| 200 |
+
mm_data.point_cloud_path = str(file)
|
| 201 |
+
elif "_audio_" in file.name and file.suffix == ".wav":
|
| 202 |
+
mm_data.audio_path = str(file)
|
| 203 |
+
|
| 204 |
+
self.multimodal_data[point_name] = mm_data
|
| 205 |
+
|
| 206 |
+
def _load_parameters(self):
|
| 207 |
+
"""Load device parameters."""
|
| 208 |
+
split_path = self.root_path / self.split.value
|
| 209 |
+
params_path = split_path / "Parameters"
|
| 210 |
+
|
| 211 |
+
if not params_path.exists():
|
| 212 |
+
return
|
| 213 |
+
|
| 214 |
+
# Load Device_*.json files
|
| 215 |
+
for param_file in params_path.glob("*.json"):
|
| 216 |
+
device_name = param_file.stem
|
| 217 |
+
with open(param_file, 'r', encoding='utf-8') as f:
|
| 218 |
+
self.device_parameters[device_name] = json.load(f)
|
| 219 |
+
|
| 220 |
+
def __len__(self) -> int:
|
| 221 |
+
return len(self.annotations)
|
| 222 |
+
|
| 223 |
+
def __getitem__(self, idx: int) -> Dict[str, Any]:
|
| 224 |
+
"""
|
| 225 |
+
Get a single sample.
|
| 226 |
+
|
| 227 |
+
Returns:
|
| 228 |
+
Dictionary containing:
|
| 229 |
+
- image: RGB image tensor (C, H, W)
|
| 230 |
+
- label: 0 for normal, 1 for anomaly
|
| 231 |
+
- json_data: annotation from json file
|
| 232 |
+
- txt_data: semantic description from txt file
|
| 233 |
+
- metadata: additional metadata
|
| 234 |
+
"""
|
| 235 |
+
ann = self.annotations[idx]
|
| 236 |
+
|
| 237 |
+
# Load image
|
| 238 |
+
image = cv2.imread(ann.image_path)
|
| 239 |
+
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
| 240 |
+
|
| 241 |
+
if self.transform:
|
| 242 |
+
image = self.transform(image)
|
| 243 |
+
|
| 244 |
+
# Load json annotation
|
| 245 |
+
json_data = None
|
| 246 |
+
if ann.json_path and os.path.exists(ann.json_path):
|
| 247 |
+
with open(ann.json_path, 'r', encoding='utf-8') as f:
|
| 248 |
+
json_data = json.load(f)
|
| 249 |
+
|
| 250 |
+
# Load txt description
|
| 251 |
+
txt_data = None
|
| 252 |
+
if ann.txt_path and os.path.exists(ann.txt_path):
|
| 253 |
+
with open(ann.txt_path, 'r', encoding='utf-8') as f:
|
| 254 |
+
txt_data = f.read().strip()
|
| 255 |
+
|
| 256 |
+
return {
|
| 257 |
+
"image": image,
|
| 258 |
+
"label": ann.label,
|
| 259 |
+
"json_data": json_data,
|
| 260 |
+
"txt_data": txt_data,
|
| 261 |
+
"metadata": {
|
| 262 |
+
"image_path": ann.image_path,
|
| 263 |
+
"point_name": ann.point_name,
|
| 264 |
+
"frame_id": ann.frame_id,
|
| 265 |
+
"data_type": ann.data_type.value,
|
| 266 |
+
}
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
def get_multimodal_data(self, point_name: str) -> Optional[MultimodalData]:
|
| 270 |
+
"""Get multimodal data for a specific point."""
|
| 271 |
+
return self.multimodal_data.get(point_name)
|
| 272 |
+
|
| 273 |
+
def get_parameter(self, device_name: str) -> Optional[Dict[str, Any]]:
|
| 274 |
+
"""Get device parameter by name."""
|
| 275 |
+
return self.device_parameters.get(device_name)
|
| 276 |
+
|
| 277 |
+
def get_stats(self) -> Dict[str, int]:
|
| 278 |
+
"""Get dataset statistics."""
|
| 279 |
+
normal_count = sum(1 for a in self.annotations if a.data_type == DataType.NORMAL)
|
| 280 |
+
anomaly_count = sum(1 for a in self.annotations if a.data_type == DataType.ANOMALY)
|
| 281 |
+
|
| 282 |
+
return {
|
| 283 |
+
"total": len(self.annotations),
|
| 284 |
+
"normal": normal_count,
|
| 285 |
+
"anomaly": anomaly_count,
|
| 286 |
+
"points": len(set(a.point_name for a in self.annotations)),
|
| 287 |
+
"multimodal_collections": len(self.multimodal_data),
|
| 288 |
+
"device_parameters": len(self.device_parameters),
|
| 289 |
+
}
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
def create_train_test_split(
|
| 293 |
+
root_path: str,
|
| 294 |
+
transform=None,
|
| 295 |
+
load_multimodal: bool = False,
|
| 296 |
+
load_parameters: bool = False,
|
| 297 |
+
) -> Tuple[MultimodalRobotDataset, MultimodalRobotDataset]:
|
| 298 |
+
"""
|
| 299 |
+
Create train and test datasets.
|
| 300 |
+
|
| 301 |
+
Args:
|
| 302 |
+
root_path: Root path to DATA_PATH directory
|
| 303 |
+
transform: Optional transform to apply to images
|
| 304 |
+
load_multimodal: Whether to load multimodal data paths
|
| 305 |
+
load_parameters: Whether to load device parameters
|
| 306 |
+
|
| 307 |
+
Returns:
|
| 308 |
+
Tuple of (train_dataset, test_dataset)
|
| 309 |
+
"""
|
| 310 |
+
train_dataset = MultimodalRobotDataset(
|
| 311 |
+
root_path=root_path,
|
| 312 |
+
split=DataSplit.TRAIN,
|
| 313 |
+
transform=transform,
|
| 314 |
+
load_multimodal=load_multimodal,
|
| 315 |
+
load_parameters=load_parameters,
|
| 316 |
+
)
|
| 317 |
+
|
| 318 |
+
test_dataset = MultimodalRobotDataset(
|
| 319 |
+
root_path=root_path,
|
| 320 |
+
split=DataSplit.TEST,
|
| 321 |
+
transform=transform,
|
| 322 |
+
load_multimodal=load_multimodal,
|
| 323 |
+
load_parameters=load_parameters,
|
| 324 |
+
)
|
| 325 |
+
|
| 326 |
+
return train_dataset, test_dataset
|
| 327 |
+
|
| 328 |
+
|
| 329 |
+
# Example usage
|
| 330 |
+
if __name__ == "__main__":
|
| 331 |
+
import argparse
|
| 332 |
+
|
| 333 |
+
parser = argparse.ArgumentParser(description="Multimodal Robot Anomaly Dataset Loader")
|
| 334 |
+
parser.add_argument("--root", type=str, default="/home/tc/trainData/multimodal_data_process/split1/DATA_PATH",
|
| 335 |
+
help="Root path to DATA_PATH directory")
|
| 336 |
+
parser.add_argument("--split", type=str, choices=["train", "test", "all"], default="all",
|
| 337 |
+
help="Which split to load")
|
| 338 |
+
parser.add_argument("--stats", action="store_true", help="Print dataset statistics")
|
| 339 |
+
args = parser.parse_args()
|
| 340 |
+
|
| 341 |
+
if args.split == "all":
|
| 342 |
+
train_ds, test_ds = create_train_test_split(
|
| 343 |
+
root_path=args.root,
|
| 344 |
+
load_multimodal=True,
|
| 345 |
+
load_parameters=True,
|
| 346 |
+
)
|
| 347 |
+
|
| 348 |
+
print("=" * 50)
|
| 349 |
+
print("TRAIN Dataset Statistics:")
|
| 350 |
+
print("=" * 50)
|
| 351 |
+
for k, v in train_ds.get_stats().items():
|
| 352 |
+
print(f" {k}: {v}")
|
| 353 |
+
|
| 354 |
+
print("\n" + "=" * 50)
|
| 355 |
+
print("TEST Dataset Statistics:")
|
| 356 |
+
print("=" * 50)
|
| 357 |
+
for k, v in test_ds.get_stats().items():
|
| 358 |
+
print(f" {k}: {v}")
|
| 359 |
+
|
| 360 |
+
else:
|
| 361 |
+
split = DataSplit.TRAIN if args.split == "train" else DataSplit.TEST
|
| 362 |
+
dataset = MultimodalRobotDataset(
|
| 363 |
+
root_path=args.root,
|
| 364 |
+
split=split,
|
| 365 |
+
load_multimodal=True,
|
| 366 |
+
load_parameters=True,
|
| 367 |
+
)
|
| 368 |
+
|
| 369 |
+
print("=" * 50)
|
| 370 |
+
print(f"{args.split.upper()} Dataset Statistics:")
|
| 371 |
+
print("=" * 50)
|
| 372 |
+
for k, v in dataset.get_stats().items():
|
| 373 |
+
print(f" {k}: {v}")
|
| 374 |
+
|
| 375 |
+
# Test loading a sample
|
| 376 |
+
if args.stats and args.split == "all":
|
| 377 |
+
print("\n" + "=" * 50)
|
| 378 |
+
print("Sample Data (first 3):")
|
| 379 |
+
print("=" * 50)
|
| 380 |
+
for i, sample in enumerate(train_ds):
|
| 381 |
+
if i >= 3:
|
| 382 |
+
break
|
| 383 |
+
print(f"\nSample {i + 1}:")
|
| 384 |
+
print(f" Label: {sample['label']} ({'Normal' if sample['label'] == 0 else 'Anomaly'})")
|
| 385 |
+
print(f" Point: {sample['metadata']['point_name']}")
|
| 386 |
+
print(f" Frame: {sample['metadata']['frame_id']}")
|
| 387 |
+
print(f" Image shape: {sample['image'].shape if hasattr(sample['image'], 'shape') else 'N/A'}")
|
model_api_generate_results.py
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
================================================================================
|
| 3 |
+
DMX API Batch Image Analysis Script (with Progress & ETA)
|
| 4 |
+
================================================================================
|
| 5 |
+
Description:
|
| 6 |
+
Batch analyzes local images using specified multimodal model via DMX API,
|
| 7 |
+
and saves results as .txt files named after each image.
|
| 8 |
+
================================================================================
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
import base64
|
| 12 |
+
import json
|
| 13 |
+
import os
|
| 14 |
+
import time
|
| 15 |
+
import glob
|
| 16 |
+
from pathlib import Path
|
| 17 |
+
from datetime import datetime, timedelta
|
| 18 |
+
|
| 19 |
+
import requests
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
# ============================================================================
|
| 23 |
+
# Utility Functions
|
| 24 |
+
# ============================================================================
|
| 25 |
+
|
| 26 |
+
def encode_image(image_path):
|
| 27 |
+
"""Encode local image file to Base64 string"""
|
| 28 |
+
with open(image_path, "rb") as image_file:
|
| 29 |
+
return base64.b64encode(image_file.read()).decode("utf-8")
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
def get_image_files(annotations_dir):
|
| 33 |
+
"""
|
| 34 |
+
Recursively find all image files from Annotations directory
|
| 35 |
+
(assumes images share the same name as annotations but with common image extensions)
|
| 36 |
+
Note: Actual images may not be in Annotations directory, but in sibling directories like JPEGImages or images.
|
| 37 |
+
This assumes images are in the same level as Annotations, or Annotations contains images (adjust based on your needs)
|
| 38 |
+
"""
|
| 39 |
+
# Common image extensions
|
| 40 |
+
image_extensions = ['*.jpg', '*.jpeg', '*.png', '*.bmp', '*.tiff', '*.webp']
|
| 41 |
+
image_paths = []
|
| 42 |
+
for ext in image_extensions:
|
| 43 |
+
image_paths.extend(glob.glob(os.path.join(annotations_dir, '**', ext), recursive=True))
|
| 44 |
+
# If images are in another directory (e.g., ../JPEGImages), add paths here
|
| 45 |
+
# For example:
|
| 46 |
+
# image_dir = os.path.join(annotations_dir, '..', 'JPEGImages')
|
| 47 |
+
# image_paths.extend(glob.glob(os.path.join(image_dir, '**', ext), recursive=True))
|
| 48 |
+
return sorted(image_paths)
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
# ============================================================================
|
| 52 |
+
# API Configuration
|
| 53 |
+
# ============================================================================
|
| 54 |
+
|
| 55 |
+
BASE_URL = "https://www.dmxapi.cn/"
|
| 56 |
+
API_ENDPOINT = BASE_URL + "v1/chat/completions"
|
| 57 |
+
API_KEY = "sk-***"
|
| 58 |
+
|
| 59 |
+
# Model name (used to create results folder)
|
| 60 |
+
MODEL_NAME = "claude-opus-4-5-20251101"
|
| 61 |
+
|
| 62 |
+
# Path Configuration
|
| 63 |
+
ANNOTATIONS_ROOT = "/path/to/your/DATA_PATH/test/Annotations"
|
| 64 |
+
MODEL_RESULTS_PATH = "/path/to/your/model_generate_results_dir/%s" % MODEL_NAME
|
| 65 |
+
os.makedirs(MODEL_RESULTS_PATH, exist_ok=True)
|
| 66 |
+
OUTPUT_DIR = os.path.join(MODEL_RESULTS_PATH, MODEL_NAME)
|
| 67 |
+
os.makedirs(OUTPUT_DIR, exist_ok=True)
|
| 68 |
+
|
| 69 |
+
# Get all image paths
|
| 70 |
+
image_paths = get_image_files(ANNOTATIONS_ROOT)
|
| 71 |
+
total_images = len(image_paths)
|
| 72 |
+
|
| 73 |
+
if total_images == 0:
|
| 74 |
+
print(f"[!] No image files found in {ANNOTATIONS_ROOT} and its subdirectories.")
|
| 75 |
+
exit(1)
|
| 76 |
+
|
| 77 |
+
print(f"[INFO] Found {total_images} images, results will be saved to: {OUTPUT_DIR}")
|
| 78 |
+
|
| 79 |
+
# Build prompt (unchanged)
|
| 80 |
+
prompt = (
|
| 81 |
+
"Please analyze the input industrial scene image according to the following criteria:\n\n"
|
| 82 |
+
"Task Objectives:\n"
|
| 83 |
+
"1. Describe key visual elements in the image (e.g., personnel behavior, environmental conditions, object distribution, hazard sources, etc.).\n"
|
| 84 |
+
"2. Assess the safety level of the scene into one of four categories:\n"
|
| 85 |
+
" - Level one: High-risk hazards present that could lead to severe incidents (e.g., open flame, smoke, personnel collapse, oil leakage, etc.);\n"
|
| 86 |
+
" - Level two: Moderate risks present that may cause safety issues or violations (e.g., using a mobile phone, oil accumulation, foreign objects, missing required PPE, etc.);\n"
|
| 87 |
+
" - Level three: Minor hazards present that require attention but are not urgent (e.g., water pooling, small foreign objects, missing face mask, etc.);\n"
|
| 88 |
+
" - no abnormalities observed: No obvious abnormalities or risk factors.\n\n"
|
| 89 |
+
"Assessment Criteria (by industry):\n"
|
| 90 |
+
"| Safety Level | Oil & Gas / Chemical | Coal Conveyor Gallery | Tunnel | Power | Metallurgy |\n"
|
| 91 |
+
"|--------------|----------------------|------------------------|--------|-------|------------|\n"
|
| 92 |
+
"| Level one | Open flame, smoke, no hard hat, no gloves, no mask, smoking, personnel collapse, oil leakage | Open flame, smoke, no hard hat, smoking, personnel collapse | Open flame, smoke, non-motorized vehicles in fast lane, wood, metal, personnel collapse | Open flame, smoke, smoking, personnel collapse | Open flame, smoke, no hard hat, personnel collapse |\n"
|
| 93 |
+
"| Level two | Water pooling, using mobile phone | Using mobile phone, no gloves, no mask, foreign objects (plastic bags, bottles, foam, metal, paper) | Foam, plastic bags, plastic bottles, no hard hat, cabinet door open | Water pooling, oil accumulation, using mobile phone, foreign objects (plastic bags, bottles, foam, metal, paper), no hard hat, no gloves, cabinet door open | No gloves, no mask, smoking |\n"
|
| 94 |
+
"| Level three | Foreign objects | Water pooling | Water pooling, oil accumulation, using mobile phone, no gloves, no mask, smoking | No mask | Water pooling, oil accumulation, using mobile phone, foreign objects (plastic bags, bottles, foam, metal, paper) |\n\n"
|
| 95 |
+
"Notes:\n"
|
| 96 |
+
"- If the image cannot be clearly recognized, output 'Unrecognizable' and explain the reason in the [Image Description].\n"
|
| 97 |
+
"- If the scene exhibits characteristics of multiple industries, prioritize the most relevant industry category.\n"
|
| 98 |
+
"- If no risk factors are present, assign the safety level as 'no abnormalities observed'."
|
| 99 |
+
"Output Format Requirements:\n"
|
| 100 |
+
"Strictly follow the structure below (do not add extra content,only include Image Description and Safety Level):\n\n"
|
| 101 |
+
"[Image Description]\n"
|
| 102 |
+
"[Detailed description of the scene, human actions, environmental features, visible objects, etc.]\n\n"
|
| 103 |
+
"[Safety Level]\n"
|
| 104 |
+
"[Level one / Level two / Level three / no abnormalities observed]\n\n"
|
| 105 |
+
)
|
| 106 |
+
|
| 107 |
+
headers = {
|
| 108 |
+
"Content-Type": "application/json",
|
| 109 |
+
"Authorization": f"{API_KEY}"
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
# ============================================================================
|
| 113 |
+
# Main Batch Processing Loop
|
| 114 |
+
# ============================================================================
|
| 115 |
+
|
| 116 |
+
processed = 0
|
| 117 |
+
total_time = 0.0
|
| 118 |
+
start_all = time.time()
|
| 119 |
+
|
| 120 |
+
for img_path in image_paths:
|
| 121 |
+
img_name = os.path.splitext(os.path.basename(img_path))[0]
|
| 122 |
+
output_file = os.path.join(OUTPUT_DIR, f"{img_name}.txt")
|
| 123 |
+
|
| 124 |
+
# Skip already processed images
|
| 125 |
+
if os.path.exists(output_file):
|
| 126 |
+
print(f"[SKIP] Already exists: {img_name}")
|
| 127 |
+
processed += 1
|
| 128 |
+
continue
|
| 129 |
+
|
| 130 |
+
try:
|
| 131 |
+
# Encode image
|
| 132 |
+
image_data = encode_image(img_path)
|
| 133 |
+
except FileNotFoundError:
|
| 134 |
+
print(f"[ERROR] Image not found: {img_path}")
|
| 135 |
+
continue
|
| 136 |
+
except Exception as e:
|
| 137 |
+
print(f"[ERROR] Encoding failed {img_path}: {e}")
|
| 138 |
+
continue
|
| 139 |
+
|
| 140 |
+
payload = {
|
| 141 |
+
"model": MODEL_NAME,
|
| 142 |
+
"messages": [
|
| 143 |
+
{
|
| 144 |
+
"role": "user",
|
| 145 |
+
"content": [
|
| 146 |
+
{"type": "text", "text": prompt},
|
| 147 |
+
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_data}"}}
|
| 148 |
+
]
|
| 149 |
+
}
|
| 150 |
+
],
|
| 151 |
+
"temperature": 0.1
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
start = time.time()
|
| 155 |
+
try:
|
| 156 |
+
response = requests.post(API_ENDPOINT, headers=headers, json=payload, timeout=60)
|
| 157 |
+
elapsed = time.time() - start
|
| 158 |
+
total_time += elapsed
|
| 159 |
+
processed += 1
|
| 160 |
+
|
| 161 |
+
if response.status_code != 200:
|
| 162 |
+
error_msg = f"HTTP {response.status_code}: {response.text}"
|
| 163 |
+
print(f"[FAIL] {img_name} - {error_msg}")
|
| 164 |
+
# Optional: save error info to file
|
| 165 |
+
with open(output_file, 'w') as f:
|
| 166 |
+
f.write(f"[API ERROR] {error_msg}\n")
|
| 167 |
+
continue
|
| 168 |
+
|
| 169 |
+
result = response.json()
|
| 170 |
+
if "choices" in result and len(result["choices"]) > 0:
|
| 171 |
+
content = result["choices"][0]["message"]["content"]
|
| 172 |
+
with open(output_file, 'w', encoding='utf-8') as f:
|
| 173 |
+
f.write(content)
|
| 174 |
+
print(f"[OK] {img_name} ({elapsed:.2f}s)")
|
| 175 |
+
else:
|
| 176 |
+
error_detail = result.get("error", "Unknown error")
|
| 177 |
+
print(f"[FAIL] {img_name} - No valid response: {error_detail}")
|
| 178 |
+
with open(output_file, 'w') as f:
|
| 179 |
+
f.write(f"[NO RESPONSE] {error_detail}\n")
|
| 180 |
+
|
| 181 |
+
except Exception as e:
|
| 182 |
+
elapsed = time.time() - start
|
| 183 |
+
total_time += elapsed
|
| 184 |
+
processed += 1
|
| 185 |
+
print(f"[EXCEPTION] {img_name}: {e}")
|
| 186 |
+
with open(output_file, 'w') as f:
|
| 187 |
+
f.write(f"[EXCEPTION] {str(e)}\n")
|
| 188 |
+
continue
|
| 189 |
+
|
| 190 |
+
# Calculate ETA
|
| 191 |
+
if processed > 0:
|
| 192 |
+
avg_time = total_time / processed
|
| 193 |
+
remaining = total_images - processed
|
| 194 |
+
eta_seconds = avg_time * remaining
|
| 195 |
+
eta_str = str(timedelta(seconds=int(eta_seconds)))
|
| 196 |
+
print(f" -> Progress: {processed}/{total_images} | Avg time: {avg_time:.2f}s | ETA: {eta_str}")
|
| 197 |
+
|
| 198 |
+
# ============================================================================
|
| 199 |
+
# Final Statistics
|
| 200 |
+
# ============================================================================
|
| 201 |
+
total_elapsed = time.time() - start_all
|
| 202 |
+
print("\n" + "=" * 80)
|
| 203 |
+
print(f"Batch processing completed!")
|
| 204 |
+
print(f"Total images: {total_images}")
|
| 205 |
+
print(f"Processed/Skipped: {processed}")
|
| 206 |
+
print(f"Total time: {timedelta(seconds=int(total_elapsed))}")
|
| 207 |
+
print(f"Results saved to: {OUTPUT_DIR}")
|
| 208 |
+
print("=" * 80)
|
model_benchmark_evaluation.py
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
"""
|
| 4 |
+
Benchmark Evaluation Script for Model Text Similarity
|
| 5 |
+
=========================================================
|
| 6 |
+
Compares generated results with reference texts using text embeddings.
|
| 7 |
+
"""
|
| 8 |
+
|
| 9 |
+
import numpy as np
|
| 10 |
+
import requests
|
| 11 |
+
import subprocess
|
| 12 |
+
import os
|
| 13 |
+
from pathlib import Path
|
| 14 |
+
from typing import List
|
| 15 |
+
|
| 16 |
+
MODEL_NAME = "grok-4.1-fast"
|
| 17 |
+
MODEL_RESULTS_PATH = "/path/to/your/model_generate_results_dir/%s/" % MODEL_NAME
|
| 18 |
+
TEST_DATA_PATH = "/path/to/your/DATA_PATH/test/"
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class TextSimilarityCalculator:
|
| 22 |
+
def __init__(self, model_name="bge-m3", ollama_host="http://localhost:11434"):
|
| 23 |
+
self.model_name = model_name
|
| 24 |
+
self.ollama_host = ollama_host
|
| 25 |
+
|
| 26 |
+
def get_embedding(self, text: str) -> List[float]:
|
| 27 |
+
try:
|
| 28 |
+
response = requests.get(f"{self.ollama_host}/api/tags")
|
| 29 |
+
if response.status_code != 200:
|
| 30 |
+
return None
|
| 31 |
+
|
| 32 |
+
payload = {"model": self.model_name, "prompt": text, "stream": False}
|
| 33 |
+
response = requests.post(f"{self.ollama_host}/api/embeddings", json=payload, timeout=30)
|
| 34 |
+
|
| 35 |
+
if response.status_code == 200:
|
| 36 |
+
return response.json().get("embedding", [])
|
| 37 |
+
return None
|
| 38 |
+
except:
|
| 39 |
+
return None
|
| 40 |
+
|
| 41 |
+
def cosine_similarity(self, vec1: List[float], vec2: List[float]) -> float:
|
| 42 |
+
if not vec1 or not vec2:
|
| 43 |
+
return 0.0
|
| 44 |
+
|
| 45 |
+
vec1, vec2 = np.array(vec1), np.array(vec2)
|
| 46 |
+
norm1, norm2 = np.linalg.norm(vec1), np.linalg.norm(vec2)
|
| 47 |
+
|
| 48 |
+
if norm1 == 0 or norm2 == 0:
|
| 49 |
+
return 0.0
|
| 50 |
+
|
| 51 |
+
return np.dot(vec1, vec2) / (norm1 * norm2)
|
| 52 |
+
|
| 53 |
+
def calculate_similarity(self, text1: str, text2: str) -> float:
|
| 54 |
+
embedding1, embedding2 = self.get_embedding(text1), self.get_embedding(text2)
|
| 55 |
+
if embedding1 is None or embedding2 is None:
|
| 56 |
+
return 0.0
|
| 57 |
+
return float(self.cosine_similarity(embedding1, embedding2))
|
| 58 |
+
|
| 59 |
+
def check_ollama_installation(self):
|
| 60 |
+
try:
|
| 61 |
+
result = subprocess.run(["ollama", "--version"], capture_output=True, text=True)
|
| 62 |
+
if result.returncode == 0:
|
| 63 |
+
result = subprocess.run(["ollama", "list"], capture_output=True, text=True)
|
| 64 |
+
return self.model_name in result.stdout
|
| 65 |
+
return False
|
| 66 |
+
except:
|
| 67 |
+
return False
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
def find_matching_txt_files(ref_dir, test_dir):
|
| 71 |
+
matches = []
|
| 72 |
+
|
| 73 |
+
ref_txt_files = list(Path(ref_dir).glob("*.txt"))
|
| 74 |
+
|
| 75 |
+
for txt_path in Path(test_dir).rglob("*.txt"):
|
| 76 |
+
txt_name = txt_path.name
|
| 77 |
+
|
| 78 |
+
matching_ref = [ref for ref in ref_txt_files if ref.name == txt_name]
|
| 79 |
+
|
| 80 |
+
if matching_ref:
|
| 81 |
+
for ref_file in matching_ref:
|
| 82 |
+
matches.append((ref_file, txt_path))
|
| 83 |
+
|
| 84 |
+
return matches
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
def read_file_content(file_path):
|
| 88 |
+
try:
|
| 89 |
+
with open(file_path, 'r', encoding='utf-8') as f:
|
| 90 |
+
return f.read().strip()
|
| 91 |
+
except:
|
| 92 |
+
return ""
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
def main():
|
| 96 |
+
matches = find_matching_txt_files(MODEL_RESULTS_PATH, TEST_DATA_PATH)
|
| 97 |
+
|
| 98 |
+
if not matches:
|
| 99 |
+
print("No matching txt files found")
|
| 100 |
+
return
|
| 101 |
+
|
| 102 |
+
print(f"Found {len(matches)} matching txt file pairs")
|
| 103 |
+
print("-" * 50)
|
| 104 |
+
|
| 105 |
+
calculator = TextSimilarityCalculator()
|
| 106 |
+
|
| 107 |
+
if not calculator.check_ollama_installation():
|
| 108 |
+
print("Ollama environment check failed")
|
| 109 |
+
return
|
| 110 |
+
|
| 111 |
+
similarities = []
|
| 112 |
+
|
| 113 |
+
for i, (ref_path, test_path) in enumerate(matches, 1):
|
| 114 |
+
ref_content = read_file_content(ref_path)
|
| 115 |
+
test_content = read_file_content(test_path)
|
| 116 |
+
|
| 117 |
+
if not ref_content or not test_content:
|
| 118 |
+
print(f"File {ref_path.name}: Skipped (empty content)")
|
| 119 |
+
continue
|
| 120 |
+
|
| 121 |
+
similarity = calculator.calculate_similarity(ref_content, test_content)
|
| 122 |
+
similarities.append(similarity)
|
| 123 |
+
|
| 124 |
+
print(f"Pair {i}: {ref_path.name}")
|
| 125 |
+
print(f" Reference file: {ref_path}")
|
| 126 |
+
print(f" Target file: {test_path}")
|
| 127 |
+
print(f" Similarity: {similarity:.4f}")
|
| 128 |
+
print("-" * 30)
|
| 129 |
+
|
| 130 |
+
if similarities:
|
| 131 |
+
avg_similarity = np.mean(similarities)
|
| 132 |
+
print("=" * 50)
|
| 133 |
+
print(f"Total file pairs: {len(similarities)}")
|
| 134 |
+
print(f"Average similarity: {avg_similarity:.4f}")
|
| 135 |
+
else:
|
| 136 |
+
print("No valid file pairs for similarity calculation")
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
if __name__ == "__main__":
|
| 140 |
+
main()
|
model_confusion_matrix.py
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import re
|
| 3 |
+
import numpy as np
|
| 4 |
+
import matplotlib.pyplot as plt
|
| 5 |
+
import seaborn as sns
|
| 6 |
+
from collections import defaultdict
|
| 7 |
+
|
| 8 |
+
MODEL_NAME = "grok-4.1-fast"
|
| 9 |
+
MODEL_RESULTS_PATH = "/path/to/your/model_generate_results_dir/%s/" % MODEL_NAME
|
| 10 |
+
GT_ROOT_ANOMALY = "/path/to/your/DATA_PATH/test/Annotations/Anomaly_data"
|
| 11 |
+
GT_ROOT_NORMAL = "/path/to/your/DATA_PATH/test/Annotations/Normal_data"
|
| 12 |
+
|
| 13 |
+
# Define class order
|
| 14 |
+
classes = ["level one", "level two", "level three", "no abnormalities observed", "unrecognizable"]
|
| 15 |
+
tick_label_classes = ["level Ⅰ", "level Ⅱ", "level Ⅲ", "level Ⅳ", "unrecognizable"]
|
| 16 |
+
|
| 17 |
+
# Ground truth label mapping
|
| 18 |
+
label_map = {
|
| 19 |
+
"observed": "no abnormalities observed",
|
| 20 |
+
"one": "level one",
|
| 21 |
+
"two": "level two",
|
| 22 |
+
"ii": "level two",
|
| 23 |
+
"2": "level two",
|
| 24 |
+
"three": "level three",
|
| 25 |
+
"unrecognizable": "unrecognizable",
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
def extract_prediction(file_path):
|
| 30 |
+
"""Extract the last word from prediction file and map to standard class"""
|
| 31 |
+
with open(file_path, 'r', encoding='utf-8') as f:
|
| 32 |
+
lines = f.readlines()
|
| 33 |
+
if not lines:
|
| 34 |
+
return label_map["unrecognizable"]
|
| 35 |
+
last_line = lines[-1].strip()
|
| 36 |
+
if '(' in last_line:
|
| 37 |
+
last_line = last_line.split('(')[0]
|
| 38 |
+
|
| 39 |
+
words = last_line.split()
|
| 40 |
+
if not words:
|
| 41 |
+
return label_map["unrecognizable"]
|
| 42 |
+
|
| 43 |
+
last_word = words[-1]
|
| 44 |
+
# Remove possible punctuation (e.g., period)
|
| 45 |
+
last_word = last_word.rstrip('.').strip().lower().replace('level]', '').replace(']', '')
|
| 46 |
+
if last_word in label_map:
|
| 47 |
+
return label_map[last_word]
|
| 48 |
+
else:
|
| 49 |
+
print(f"Warning: Unknown prediction label keyword: '{last_word}' in {file_path}")
|
| 50 |
+
return label_map["unrecognizable"]
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
def extract_ground_truth(file_path):
|
| 54 |
+
"""Extract the last word from ground truth file and map to standard class"""
|
| 55 |
+
with open(file_path, 'r', encoding='utf-8') as f:
|
| 56 |
+
lines = f.readlines()
|
| 57 |
+
if not lines:
|
| 58 |
+
return None
|
| 59 |
+
last_line = lines[-1].strip()
|
| 60 |
+
words = last_line.split()
|
| 61 |
+
if not words:
|
| 62 |
+
return None
|
| 63 |
+
last_word = words[-1]
|
| 64 |
+
# Remove possible punctuation (e.g., period)
|
| 65 |
+
last_word = last_word.rstrip('.').strip().lower()
|
| 66 |
+
if last_word in label_map:
|
| 67 |
+
return label_map[last_word]
|
| 68 |
+
else:
|
| 69 |
+
print(f"Warning: Unknown ground truth label keyword: '{last_word}' in {file_path}")
|
| 70 |
+
return None
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
def collect_files(root_dir):
|
| 74 |
+
"""Recursively collect all .txt files in directory, return {filename: full_path} dict"""
|
| 75 |
+
file_dict = {}
|
| 76 |
+
for dirpath, _, filenames in os.walk(root_dir):
|
| 77 |
+
for f in filenames:
|
| 78 |
+
if f.endswith('.txt'):
|
| 79 |
+
file_dict[f] = os.path.join(dirpath, f)
|
| 80 |
+
return file_dict
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
def main():
|
| 84 |
+
# Collect prediction and ground truth files
|
| 85 |
+
pred_files = collect_files(MODEL_RESULTS_PATH)
|
| 86 |
+
gt_files1 = collect_files(GT_ROOT_ANOMALY)
|
| 87 |
+
gt_files2 = collect_files(GT_ROOT_NORMAL)
|
| 88 |
+
gt_files = {**gt_files1, **gt_files2}
|
| 89 |
+
|
| 90 |
+
# Match filenames
|
| 91 |
+
common_files = set(pred_files.keys()) & set(gt_files.keys())
|
| 92 |
+
print(f"Found {len(common_files)} matching samples")
|
| 93 |
+
|
| 94 |
+
# Initialize confusion matrix
|
| 95 |
+
cm = np.zeros((len(classes), len(classes)), dtype=int)
|
| 96 |
+
|
| 97 |
+
class_to_index = {cls: i for i, cls in enumerate(classes)}
|
| 98 |
+
|
| 99 |
+
count_valid = 0
|
| 100 |
+
for fname in common_files:
|
| 101 |
+
pred_path = pred_files[fname]
|
| 102 |
+
gt_path = gt_files[fname]
|
| 103 |
+
|
| 104 |
+
pred = extract_prediction(pred_path)
|
| 105 |
+
gt = extract_ground_truth(gt_path)
|
| 106 |
+
|
| 107 |
+
if pred is None or gt is None:
|
| 108 |
+
continue
|
| 109 |
+
|
| 110 |
+
if pred not in class_to_index or gt not in class_to_index:
|
| 111 |
+
print(f"Skip invalid class: pred={pred}, gt={gt}")
|
| 112 |
+
continue
|
| 113 |
+
|
| 114 |
+
i = class_to_index[gt] # Ground truth -> row
|
| 115 |
+
j = class_to_index[pred] # Prediction -> column
|
| 116 |
+
cm[i, j] += 1
|
| 117 |
+
count_valid += 1
|
| 118 |
+
|
| 119 |
+
print(f"Valid samples: {count_valid}")
|
| 120 |
+
|
| 121 |
+
# Plot confusion matrix
|
| 122 |
+
plt.figure(figsize=(8, 6))
|
| 123 |
+
sns.set(font_scale=1.2)
|
| 124 |
+
sns.heatmap(cm, annot=True, fmt='d', cmap='Blues',
|
| 125 |
+
xticklabels=tick_label_classes,
|
| 126 |
+
yticklabels=tick_label_classes)
|
| 127 |
+
plt.xlabel('Predicted Label')
|
| 128 |
+
plt.ylabel('True Label')
|
| 129 |
+
plt.title(MODEL_NAME)
|
| 130 |
+
plt.xticks(rotation=45, ha='right')
|
| 131 |
+
plt.yticks(rotation=0)
|
| 132 |
+
plt.tight_layout()
|
| 133 |
+
plt.savefig(f"{MODEL_NAME}.png", dpi=300)
|
| 134 |
+
plt.show()
|
| 135 |
+
|
| 136 |
+
|
| 137 |
+
if __name__ == "__main__":
|
| 138 |
+
main()
|
test.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:818086e696f970e036bf6a76758e4fb851fa26f771fe4eac56f8dc073b44358d
|
| 3 |
+
size 5748799871
|
train.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ef03b9eb2f9bd91b03f203a8e6cfcc3464cb0d9f0215349a80ad95281fa88cd6
|
| 3 |
+
size 17886855594
|