Dongping-Chen commited on
Commit
f7c8218
1 Parent(s): 338aa28

delete unrelated files

Browse files
1.sh DELETED
@@ -1,23 +0,0 @@
1
- #!/bin/bash
2
-
3
-
4
- # 查找并跟踪大于10MB的文件
5
- find . -size +10M -type f | while read file; do
6
- git lfs track "$file"
7
- done
8
-
9
- # 把 .gitattributes 添加到 Git
10
- git add .gitattributes
11
- git commit -m "Track large files using Git LFS"
12
-
13
- # 移除这些文件的缓存(不删除文件本身),然后重新添加和提交它们
14
- find . -size +10M -type f | while read file; do
15
- git rm --cached "$file" # 移除缓存
16
- git add "$file" # 重新添加文件
17
- done
18
-
19
- # 创建一个提交
20
- git commit -m "Re-add large files to track them with Git LFS"
21
-
22
- # 现在可以尝试推送到远程仓库
23
- git push origin main
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scene-graph/scene_graph/combine.ipynb DELETED
@@ -1,133 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 30,
6
- "metadata": {},
7
- "outputs": [],
8
- "source": [
9
- "import json\n",
10
- "with open('ActionGenome.jsonl', 'r') as f:\n",
11
- " data = [json.loads(line) for line in f]\n",
12
- " \n",
13
- "with open('pvsg_relations.jsonl', 'r') as f:\n",
14
- " data2 = [json.loads(line) for line in f]\n",
15
- " \n"
16
- ]
17
- },
18
- {
19
- "cell_type": "code",
20
- "execution_count": 5,
21
- "metadata": {},
22
- "outputs": [
23
- {
24
- "data": {
25
- "text/plain": [
26
- "{'video_id': '50N4E',\n",
27
- " 'query_id': 0,\n",
28
- " 'video_path': 'ActionGenome/50N4E.mp4',\n",
29
- " 'subject': 'Person',\n",
30
- " 'relation': 'in_front_of',\n",
31
- " 'object': 'dish',\n",
32
- " 'relation_type': 'spatial'}"
33
- ]
34
- },
35
- "execution_count": 5,
36
- "metadata": {},
37
- "output_type": "execute_result"
38
- }
39
- ],
40
- "source": [
41
- "data[0]"
42
- ]
43
- },
44
- {
45
- "cell_type": "code",
46
- "execution_count": 12,
47
- "metadata": {},
48
- "outputs": [
49
- {
50
- "data": {
51
- "text/plain": [
52
- "{'query_id': 0,\n",
53
- " 'video_id': '0001_4164158586',\n",
54
- " 'video_path': 'PVSG/Vidor/0001_4164158586.mp4',\n",
55
- " 'num_frames': 180,\n",
56
- " 'height': 360,\n",
57
- " 'subject': 'adult',\n",
58
- " 'relation': 'holding',\n",
59
- " 'object': 'child',\n",
60
- " 'duration': [[102, 110]]}"
61
- ]
62
- },
63
- "execution_count": 12,
64
- "metadata": {},
65
- "output_type": "execute_result"
66
- }
67
- ],
68
- "source": [
69
- "data2[0]"
70
- ]
71
- },
72
- {
73
- "cell_type": "code",
74
- "execution_count": 31,
75
- "metadata": {},
76
- "outputs": [],
77
- "source": [
78
- "new_items = {}\n",
79
- "for item in data:\n",
80
- " item.pop('video_id')\n",
81
- " item.pop('query_id')\n",
82
- " new_item = item\n",
83
- " id = item['video_path'].replace('.mp4', '').replace('/', '_')\n",
84
- " new_item['original_dataset'] = 'Action Genome'\n",
85
- " new_item['video_path'] = 'videos/' + item['video_path']\n",
86
- " new_items[id] = new_item\n",
87
- " \n",
88
- "for item in data2:\n",
89
- " item.pop('video_id')\n",
90
- " item.pop('query_id')\n",
91
- " new_item = item\n",
92
- " id = item['video_path'].replace('.mp4', '').replace('/', '_')\n",
93
- " new_item['original_dataset'] = 'PVSG'\n",
94
- " new_item['video_path'] = 'videos/' + item['video_path']\n",
95
- " new_items[id] = new_item\n",
96
- "\n",
97
- "with open('combined.json', 'w') as f:\n",
98
- " json.dump(new_items, f, indent=4)"
99
- ]
100
- },
101
- {
102
- "cell_type": "code",
103
- "execution_count": 22,
104
- "metadata": {},
105
- "outputs": [],
106
- "source": [
107
- "with open('combined.json', 'w') as f:\n",
108
- " json.dump(new_items, f, indent=4)"
109
- ]
110
- }
111
- ],
112
- "metadata": {
113
- "kernelspec": {
114
- "display_name": "torch",
115
- "language": "python",
116
- "name": "python3"
117
- },
118
- "language_info": {
119
- "codemirror_mode": {
120
- "name": "ipython",
121
- "version": 3
122
- },
123
- "file_extension": ".py",
124
- "mimetype": "text/x-python",
125
- "name": "python",
126
- "nbconvert_exporter": "python",
127
- "pygments_lexer": "ipython3",
128
- "version": "3.9.18"
129
- }
130
- },
131
- "nbformat": 4,
132
- "nbformat_minor": 2
133
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scene-graph/scene_graph/combined.json DELETED
The diff for this file is too large to render. See raw diff