urikxx
commited on
Commit
•
fa2cea0
1
Parent(s):
d137c63
add train test and annotations
Browse files- extract_frames_from_videos.ipynb +46 -26
extract_frames_from_videos.ipynb
CHANGED
@@ -2,12 +2,12 @@
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
-
"execution_count":
|
6 |
"metadata": {
|
7 |
"tags": [],
|
8 |
"ExecuteTime": {
|
9 |
-
"end_time": "2024-
|
10 |
-
"start_time": "2024-
|
11 |
}
|
12 |
},
|
13 |
"outputs": [],
|
@@ -20,12 +20,12 @@
|
|
20 |
},
|
21 |
{
|
22 |
"cell_type": "code",
|
23 |
-
"execution_count":
|
24 |
"metadata": {
|
25 |
"tags": [],
|
26 |
"ExecuteTime": {
|
27 |
-
"end_time": "2024-
|
28 |
-
"start_time": "2024-
|
29 |
}
|
30 |
},
|
31 |
"outputs": [],
|
@@ -36,12 +36,12 @@
|
|
36 |
},
|
37 |
{
|
38 |
"cell_type": "code",
|
39 |
-
"execution_count":
|
40 |
"metadata": {
|
41 |
"tags": [],
|
42 |
"ExecuteTime": {
|
43 |
-
"end_time": "2024-
|
44 |
-
"start_time": "2024-
|
45 |
}
|
46 |
},
|
47 |
"outputs": [],
|
@@ -67,12 +67,12 @@
|
|
67 |
},
|
68 |
{
|
69 |
"cell_type": "code",
|
70 |
-
"execution_count":
|
71 |
"metadata": {
|
72 |
"tags": [],
|
73 |
"ExecuteTime": {
|
74 |
-
"end_time": "2024-
|
75 |
-
"start_time": "2024-
|
76 |
}
|
77 |
},
|
78 |
"outputs": [],
|
@@ -84,11 +84,11 @@
|
|
84 |
" train_frame_count = 0\n",
|
85 |
" test_frame_count = 0\n",
|
86 |
"\n",
|
87 |
-
" train_save_path = os.path.join(root_directory_path, 'train
|
88 |
" if not os.path.exists(train_save_path):\n",
|
89 |
" os.makedirs(train_save_path)\n",
|
90 |
"\n",
|
91 |
-
" test_save_path = os.path.join(root_directory_path, 'test
|
92 |
" if not os.path.exists(test_save_path):\n",
|
93 |
" os.makedirs(test_save_path)\n",
|
94 |
"\n",
|
@@ -122,12 +122,12 @@
|
|
122 |
},
|
123 |
{
|
124 |
"cell_type": "code",
|
125 |
-
"execution_count":
|
126 |
"metadata": {
|
127 |
"tags": [],
|
128 |
"ExecuteTime": {
|
129 |
-
"end_time": "2024-
|
130 |
-
"start_time": "2024-
|
131 |
}
|
132 |
},
|
133 |
"outputs": [],
|
@@ -149,12 +149,12 @@
|
|
149 |
},
|
150 |
{
|
151 |
"cell_type": "code",
|
152 |
-
"execution_count":
|
153 |
"metadata": {
|
154 |
"tags": [],
|
155 |
"ExecuteTime": {
|
156 |
-
"end_time": "2024-
|
157 |
-
"start_time": "2024-
|
158 |
}
|
159 |
},
|
160 |
"outputs": [
|
@@ -165,7 +165,7 @@
|
|
165 |
"Storyboard started...\n",
|
166 |
"D:\\current\\lepidicid\\dataset\\frames_1\n",
|
167 |
"D:\\current\\lepidicid\\dataset\\frames_1\n",
|
168 |
-
"Total time:
|
169 |
"Storyboard ended success!\n"
|
170 |
]
|
171 |
}
|
@@ -185,7 +185,11 @@
|
|
185 |
{
|
186 |
"cell_type": "code",
|
187 |
"execution_count": null,
|
188 |
-
"metadata": {
|
|
|
|
|
|
|
|
|
189 |
"outputs": [],
|
190 |
"source": [
|
191 |
"'Storyboard started... \\\n",
|
@@ -196,7 +200,11 @@
|
|
196 |
{
|
197 |
"cell_type": "code",
|
198 |
"execution_count": null,
|
199 |
-
"metadata": {
|
|
|
|
|
|
|
|
|
200 |
"outputs": [],
|
201 |
"source": [
|
202 |
"'Storyboard started... \\\n",
|
@@ -207,7 +215,11 @@
|
|
207 |
{
|
208 |
"cell_type": "code",
|
209 |
"execution_count": null,
|
210 |
-
"metadata": {
|
|
|
|
|
|
|
|
|
211 |
"outputs": [],
|
212 |
"source": [
|
213 |
"'Storyboard started... \\\n",
|
@@ -218,7 +230,11 @@
|
|
218 |
{
|
219 |
"cell_type": "code",
|
220 |
"execution_count": null,
|
221 |
-
"metadata": {
|
|
|
|
|
|
|
|
|
222 |
"outputs": [],
|
223 |
"source": [
|
224 |
"'Storyboard started... \\\n",
|
@@ -229,7 +245,11 @@
|
|
229 |
{
|
230 |
"cell_type": "code",
|
231 |
"execution_count": null,
|
232 |
-
"metadata": {
|
|
|
|
|
|
|
|
|
233 |
"outputs": [],
|
234 |
"source": []
|
235 |
}
|
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
+
"execution_count": 13,
|
6 |
"metadata": {
|
7 |
"tags": [],
|
8 |
"ExecuteTime": {
|
9 |
+
"end_time": "2024-04-02T19:20:43.810656Z",
|
10 |
+
"start_time": "2024-04-02T19:20:43.798646Z"
|
11 |
}
|
12 |
},
|
13 |
"outputs": [],
|
|
|
20 |
},
|
21 |
{
|
22 |
"cell_type": "code",
|
23 |
+
"execution_count": 14,
|
24 |
"metadata": {
|
25 |
"tags": [],
|
26 |
"ExecuteTime": {
|
27 |
+
"end_time": "2024-04-02T19:20:44.354065Z",
|
28 |
+
"start_time": "2024-04-02T19:20:44.350075Z"
|
29 |
}
|
30 |
},
|
31 |
"outputs": [],
|
|
|
36 |
},
|
37 |
{
|
38 |
"cell_type": "code",
|
39 |
+
"execution_count": 15,
|
40 |
"metadata": {
|
41 |
"tags": [],
|
42 |
"ExecuteTime": {
|
43 |
+
"end_time": "2024-04-02T19:20:44.905729Z",
|
44 |
+
"start_time": "2024-04-02T19:20:44.886725Z"
|
45 |
}
|
46 |
},
|
47 |
"outputs": [],
|
|
|
67 |
},
|
68 |
{
|
69 |
"cell_type": "code",
|
70 |
+
"execution_count": 16,
|
71 |
"metadata": {
|
72 |
"tags": [],
|
73 |
"ExecuteTime": {
|
74 |
+
"end_time": "2024-04-02T19:20:45.440615Z",
|
75 |
+
"start_time": "2024-04-02T19:20:45.423612Z"
|
76 |
}
|
77 |
},
|
78 |
"outputs": [],
|
|
|
84 |
" train_frame_count = 0\n",
|
85 |
" test_frame_count = 0\n",
|
86 |
"\n",
|
87 |
+
" train_save_path = os.path.join(root_directory_path, 'train')\n",
|
88 |
" if not os.path.exists(train_save_path):\n",
|
89 |
" os.makedirs(train_save_path)\n",
|
90 |
"\n",
|
91 |
+
" test_save_path = os.path.join(root_directory_path, 'test')\n",
|
92 |
" if not os.path.exists(test_save_path):\n",
|
93 |
" os.makedirs(test_save_path)\n",
|
94 |
"\n",
|
|
|
122 |
},
|
123 |
{
|
124 |
"cell_type": "code",
|
125 |
+
"execution_count": 17,
|
126 |
"metadata": {
|
127 |
"tags": [],
|
128 |
"ExecuteTime": {
|
129 |
+
"end_time": "2024-04-02T19:20:47.327649Z",
|
130 |
+
"start_time": "2024-04-02T19:20:47.307015Z"
|
131 |
}
|
132 |
},
|
133 |
"outputs": [],
|
|
|
149 |
},
|
150 |
{
|
151 |
"cell_type": "code",
|
152 |
+
"execution_count": 18,
|
153 |
"metadata": {
|
154 |
"tags": [],
|
155 |
"ExecuteTime": {
|
156 |
+
"end_time": "2024-04-02T19:29:45.945320Z",
|
157 |
+
"start_time": "2024-04-02T19:20:51.982552Z"
|
158 |
}
|
159 |
},
|
160 |
"outputs": [
|
|
|
165 |
"Storyboard started...\n",
|
166 |
"D:\\current\\lepidicid\\dataset\\frames_1\n",
|
167 |
"D:\\current\\lepidicid\\dataset\\frames_1\n",
|
168 |
+
"Total time: 9 minutes\n",
|
169 |
"Storyboard ended success!\n"
|
170 |
]
|
171 |
}
|
|
|
185 |
{
|
186 |
"cell_type": "code",
|
187 |
"execution_count": null,
|
188 |
+
"metadata": {
|
189 |
+
"ExecuteTime": {
|
190 |
+
"start_time": "2024-04-02T19:20:40.621444Z"
|
191 |
+
}
|
192 |
+
},
|
193 |
"outputs": [],
|
194 |
"source": [
|
195 |
"'Storyboard started... \\\n",
|
|
|
200 |
{
|
201 |
"cell_type": "code",
|
202 |
"execution_count": null,
|
203 |
+
"metadata": {
|
204 |
+
"ExecuteTime": {
|
205 |
+
"start_time": "2024-04-02T19:20:40.601378Z"
|
206 |
+
}
|
207 |
+
},
|
208 |
"outputs": [],
|
209 |
"source": [
|
210 |
"'Storyboard started... \\\n",
|
|
|
215 |
{
|
216 |
"cell_type": "code",
|
217 |
"execution_count": null,
|
218 |
+
"metadata": {
|
219 |
+
"ExecuteTime": {
|
220 |
+
"start_time": "2024-04-02T19:20:40.626462Z"
|
221 |
+
}
|
222 |
+
},
|
223 |
"outputs": [],
|
224 |
"source": [
|
225 |
"'Storyboard started... \\\n",
|
|
|
230 |
{
|
231 |
"cell_type": "code",
|
232 |
"execution_count": null,
|
233 |
+
"metadata": {
|
234 |
+
"ExecuteTime": {
|
235 |
+
"start_time": "2024-04-02T19:20:40.629443Z"
|
236 |
+
}
|
237 |
+
},
|
238 |
"outputs": [],
|
239 |
"source": [
|
240 |
"'Storyboard started... \\\n",
|
|
|
245 |
{
|
246 |
"cell_type": "code",
|
247 |
"execution_count": null,
|
248 |
+
"metadata": {
|
249 |
+
"ExecuteTime": {
|
250 |
+
"start_time": "2024-04-02T19:20:40.630442Z"
|
251 |
+
}
|
252 |
+
},
|
253 |
"outputs": [],
|
254 |
"source": []
|
255 |
}
|