Skip to content

Commit

Permalink
Load correctly all scenes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurokabe committed Feb 17, 2023
1 parent 2d6ddc4 commit e88e74e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 312 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,5 @@ dmypy.json
.DS_Store
data/*

*.ipynb
*.ipynb
notebooks/*
315 changes: 15 additions & 300 deletions notebooks/test_dataset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,308 +34,26 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 38,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2023-02-16 17:25:42.140 | INFO | scenedataset.scenedataset:_get_video_paths:493 - Found 1 videos\n",
"2023-02-16 17:25:42.142 | INFO | scenedataset.scenedataset:detect_scenes:362 - Detecting scenes in /SceneDataset/data/02.mkv...\n",
"Detected: 383 | Progress: 100%|█████████▉| 34047/34049 [00:19<00:00, 1775.21frames/s]\n",
"2023-02-16 17:26:01.360 | INFO | scenedataset.scenedataset:remove_duplicate_from_scenes:286 - Removing duplicates...\n"
"2023-02-16 17:38:28.198 | INFO | scenedataset.scenedataset:_get_video_paths:493 - Found 1 videos\n",
"2023-02-16 17:38:28.211 | INFO | scenedataset.scenedataset:remove_duplicate_from_scenes:286 - Removing duplicates...\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "787db4e4583b447e8af604546744174c",
"model_id": "021edba6c8dc4cf7ac94e1f793c9db65",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Removing duplicates...: 0%| | 0/20 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f324378c66e7409daca0b0993ff72ba1",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/25 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "4d1a12a4fd4a442680ea0f7d7fe505b4",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/54 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "31f019d987024622836d9cd693c944a3",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/20 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b5ea89801ade45aea9af9f05eb09f4ff",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/109 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9e17bec3a2b144f29e05f06e9c70f1e2",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/64 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7dad917746184e369b58fa8a9d1eecb3",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/250 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f2ae7fa35c574ea680c7e1caecbc9c68",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/260 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "89f84d0dda9140a593fb7df8119d53df",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/95 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "725f445f63c44bc7ba08bebf4eb6df22",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/107 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9d3006c4541e429896c87893570bf025",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/59 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "46a9e57a6b91491bad5ad7a1edf0b3aa",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/98 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "053864aeba6047c8ade13c99f1f51d65",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/119 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c25ba79bca034c0a9b2c8ab6b04355a1",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/95 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a3c43025bd9d412b81dc8559655ef374",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/106 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "cc0c062a4c974d12af30ada41522d07f",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/73 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "abf8a68a7d004316baa5effea37ea23d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/85 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "5de8db902ea1460fb78a9822730a6e5a",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/15 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d8bc0ac49d514870a9f7765ac69ec860",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/122 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "def878521a93491a9bfa9a1ebbcc2b3f",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/44 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "bd1c66ee9be64c058e134a36f691934a",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Computing difference between frames...: 0%| | 0/62 [00:00<?, ?it/s]"
"Removing duplicates...: 0%| | 0/16 [00:00<?, ?it/s]"
]
},
"metadata": {},
Expand All @@ -344,7 +62,7 @@
],
"source": [
"dataset = SceneDataset(\n",
" paths=[\"/SceneDataset/data/02.mkv\"],\n",
" paths=[\"/SceneDataset/data/01.mkv\"],\n",
" show_progress=True,\n",
" transform=transforms.Compose(\n",
" [video_transforms.ToTensorVideo(), transforms.Resize((128, 256))]\n",
Expand All @@ -357,16 +75,16 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 39,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"4"
"0"
]
},
"execution_count": 32,
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -377,19 +95,16 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 40,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[Scene(81, 99, /SceneDataset/data/02.mkv, [81, 82, 83, 84, 85, 86, 88, 90, 92, 93, 94, 95, 96, 97, 98, 99]),\n",
" Scene(102, 121, /SceneDataset/data/02.mkv, [102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121]),\n",
" Scene(121, 140, /SceneDataset/data/02.mkv, [121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140]),\n",
" Scene(140, 159, /SceneDataset/data/02.mkv, [140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159])]"
"[]"
]
},
"execution_count": 33,
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -408,7 +123,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "scenedataset-mZH_Fr2s-py3.8",
"display_name": "venv",
"language": "python",
"name": "python3"
},
Expand All @@ -422,12 +137,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.16"
"version": "3.8.10 (default, Nov 14 2022, 12:59:47) \n[GCC 9.4.0]"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "a5d9115d08c17040944e5b7fbe5eb793d63549107852724990245c0de104487d"
"hash": "31ae8cd823759671a542fb948385bf6b2f8ab16fa3698fe82a530ef05cfee5b5"
}
}
},
Expand Down
Loading

0 comments on commit e88e74e

Please sign in to comment.