📦 wsqstar / SVIkit

📄 README.md · 89 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89# SVIkit - Street View Imagery Toolkit

[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)

用于街景图像处理的地理空间智能工具包,支持多数据格式转换和自动化分析。

## 安装
```bash
pip install svikit
```

## 快速入门
```python
from svikit import StreetData

# 加载数据
data = StreetData("./street_images")

# 查看自动分析报告
print(f"数据集分析:\n"
      f"- 图片总数: {data.analysis_report['total_images']}\n"
      f"- GPS覆盖率: {data.analysis_report['gps_coverage']}")

# 转换为地理数据格式
geo_df = data.to_geodataframe()
```

## 主要功能
✅ 多数据格式支持:  
   - 文件夹 -> DataFrame/GeoDataFrame  
   - HuggingFace Dataset -> 本地文件夹  
   - GeoJSON -> 图像索引  

✅ 自动化分析:  
   - 图像元数据统计  
   - 地理空间分布热力图  
   - 时间序列分析  

✅ 处理流水线:  
```python
data.process(
    steps=[
        ("segmentation", {"model": "unet"}),
        ("geo_tagging", {"output_crs": "EPSG:4326"})
    ]
)
```

## 示例数据
使用示例图片测试:
```bash
wget https://github.com/ianare/exif-samples/raw/master/jpg/gps/DSCN0012.jpg -O test_image.jpg
```

## 贡献指南
1. Fork仓库并创建分支:
   ```bash
   git checkout -b feature/new-processor
   ```
2. 通过测试验证修改:
   ```bash
   pytest tests/ --cov=svikit
   ```
3. 提交Pull Request


## How to install
```bash
# install in dev mode
pip install -e .
```

## How to use
```python
from svikit import StreetData

# 加载数据
data = StreetData("./street_images")

# 查看自动分析报告
print(f"数据集分析:\n"
      f"- 图片总数: {data.analysis_report['total_images']}\n"
      f"- GPS覆盖率: {data.analysis_report['gps_coverage']}")
```


## Datasets 

- https://www.mapillary.com/dataset/vistas