Datasets:
ArXiv:
License:
File size: 3,278 Bytes
fbfc378 | 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 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | # SimulationMetadata 上传指南
## 文件夹内容
```
SimulationMetadata/
├── objects/ # 物体元数据
│ ├── background_objects.json
│ ├── object_placement/ # 物体放置规则
│ └── objects_list/ # 物体列表和映射
├── scenes/ # 场景数据
│ ├── annotations/ # 场景标注(JSON + 可视化图片)
│ ├── filter/ # 过滤后的数据
│ └── image_quality_ratings.json # 图片质量评分
└── taxonomy/ # 分类体系
├── taxonomy.json
├── all_objects.json
└── *.csv (各种属性表)
```
## 上传到 Hugging Face
### 方法 1:使用脚本(推荐)
```bash
cd /home/xwang378/scratch/2025/Taxonomy/Data/SimulationMetadata
bash upload.sh
```
### 方法 2:直接运行 Python
```bash
cd /home/xwang378/scratch/2025/Taxonomy/Data/SimulationMetadata
python upload_hf.py
```
### 方法 3:后台运行(推荐用于大文件夹)
```bash
cd /home/xwang378/scratch/2025/Taxonomy/Data/SimulationMetadata
nohup python upload_hf.py > upload_log.txt 2>&1 &
# 查看进度
tail -f upload_log.txt
```
## 前提条件
1. **安装 huggingface_hub**
```bash
pip install huggingface_hub
```
2. **登录 Hugging Face**
```bash
huggingface-cli login
```
或设置环境变量:
```bash
export HF_TOKEN="your_token_here"
```
3. **确保仓库存在**
- 仓库名:`TaxonomyProject/SimulationMetadata`
- 类型:Dataset
- 权限:Write access
## 特性
✅ **智能上传**:使用 `upload_large_folder` 优化大文件夹上传
✅ **并行上传**:8 个线程并发上传
✅ **断点续传**:中断后可重新运行,自动跳过已上传文件
✅ **自动排除**:排除脚本、缓存、日志等不必要文件
✅ **进度显示**:实时显示上传进度
## 预计时间
取决于:
- 文件总数:~数千个文件
- 总大小:~数 GB
- 网络速度:~10-50 MB/s
**预计时间**:30分钟 - 2小时
## 故障排除
### 问题 1:登录失败
```bash
# 重新登录
huggingface-cli login
```
### 问题 2:权限错误
- 确保您对 `TaxonomyProject/SimulationMetadata` 有写权限
- 确认仓库类型是 `dataset`,不是 `model`
### 问题 3:网络中断
- 不用担心!重新运行脚本会自动从中断处继续
- 已上传的文件不会重复上传
### 问题 4:查看上传进度
```bash
# 如果在后台运行
tail -f upload_log.txt
# 或查看 HF 仓库页面
# https://huggingface.co/datasets/TaxonomyProject/SimulationMetadata
```
## 文件排除规则
以下文件会被自动排除(在 `ignore_patterns` 中定义):
- `upload_hf.py` - 上传脚本本身
- `*.pyc` - Python 编译缓存
- `__pycache__/` - Python 缓存目录
- `.DS_Store` - Mac 系统文件
- `*.log` - 日志文件
## 手动检查
上传完成后,访问:
https://huggingface.co/datasets/TaxonomyProject/SimulationMetadata
验证所有文件夹和文件是否正确上传。
## 更新数据
如果需要更新已上传的数据,只需重新运行脚本:
```bash
python upload_hf.py
```
它会智能地只上传变更的文件。
|