Hamidreza commited on
Commit
da60250
·
1 Parent(s): 8b5498b

2026.3.1.21.34

Browse files
Files changed (47) hide show
  1. .DS_Store +0 -0
  2. GT/task_day_left_turn/gt/gt.txt +0 -0
  3. GT/task_day_left_turn/gt/labels.txt +0 -15
  4. GT/task_day_occlusion/gt/gt.txt +0 -0
  5. GT/task_day_occlusion/gt/labels.txt +0 -15
  6. GT/task_day_pedestrian_crossing/gt/gt.txt +0 -0
  7. GT/task_day_pedestrian_crossing/gt/labels.txt +0 -15
  8. GT/task_day_right_turn/gt/gt.txt +0 -0
  9. GT/task_day_right_turn/gt/labels.txt +0 -15
  10. GT/task_day_right_turn_occlusion/gt/gt.txt +0 -0
  11. GT/task_day_right_turn_occlusion/gt/labels.txt +0 -15
  12. GT/task_day_right_turn_pedestrian/gt/gt.txt +0 -0
  13. GT/task_day_right_turn_pedestrian/gt/labels.txt +0 -15
  14. GT/task_night_far_objects/gt/gt.txt +0 -0
  15. GT/task_night_far_objects/gt/labels.txt +0 -15
  16. GT/task_night_occlusion/gt/gt.txt +0 -0
  17. GT/task_night_occlusion/gt/labels.txt +0 -15
  18. GT/task_night_occlusion_far_objects/gt/gt.txt +0 -0
  19. GT/task_night_occlusion_far_objects/gt/labels.txt +0 -15
  20. GT/task_night_right_turn_pedestrian/gt/gt.txt +0 -0
  21. GT/task_night_right_turn_pedestrian/gt/labels.txt +0 -15
  22. GT/task_night_right_turn_pedestrian_occlusion/gt/gt.txt +0 -0
  23. GT/task_night_right_turn_pedestrian_occlusion/gt/labels.txt +0 -15
  24. GT/task_tunnel/gt/gt.txt +0 -0
  25. GT/task_tunnel/gt/labels.txt +0 -15
  26. Videos_/task_day_right_turn.mp4 +0 -3
  27. Videos_/task_day_right_turn_occlusion.mp4 +0 -3
  28. Videos_/task_day_right_turn_pedestrian.mp4 +0 -3
  29. Videos_/task_night_far_objects.mp4 +0 -3
  30. Videos_/task_night_occlusion.mp4 +0 -3
  31. Videos_/task_night_right_turn_pedestrian.mp4 +0 -3
  32. Videos_/task_night_right_turn_pedestrian_occlusion.mp4 +0 -3
  33. Videos_/task_tunnel.mp4 +0 -3
  34. convert_to_coco.py +0 -104
  35. extract_frames.py +0 -60
  36. train/task_day_left_turn.zip +3 -0
  37. train/task_day_occlusion.zip +3 -0
  38. train/task_day_pedestrian_crossing.zip +3 -0
  39. train/task_day_right_turn.zip +3 -0
  40. train/task_day_right_turn_occlusion.zip +3 -0
  41. train/task_day_right_turn_pedestrian.zip +3 -0
  42. Videos_/night_occlusion_far_objects.mp4 → train/task_night_far_objects.zip +2 -2
  43. Videos_/task_day_left_turn.mp4 → train/task_night_occlusion.zip +2 -2
  44. Videos_/task_day_occlusion.mp4 → train/task_night_occlusion_far_objects.zip +2 -2
  45. train/task_night_right_turn_pedestrian.zip +3 -0
  46. train/task_night_right_turn_pedestrian_occlusion.zip +3 -0
  47. Videos_/task_day_pedestrian_crossing.mp4 → train/task_tunnel.zip +2 -2
.DS_Store ADDED
Binary file (8.2 kB). View file
 
GT/task_day_left_turn/gt/gt.txt DELETED
The diff for this file is too large to render. See raw diff
 
GT/task_day_left_turn/gt/labels.txt DELETED
@@ -1,15 +0,0 @@
1
- person
2
- bus_small
3
- bus_big
4
- truck_small
5
- truck_big
6
- car
7
- bike
8
- motorbike
9
- ignore_region
10
- tractor
11
- trailor
12
- wheelchair
13
- heavy_equipment
14
- pm
15
- umbrella
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
GT/task_day_occlusion/gt/gt.txt DELETED
The diff for this file is too large to render. See raw diff
 
GT/task_day_occlusion/gt/labels.txt DELETED
@@ -1,15 +0,0 @@
1
- person
2
- bus_small
3
- bus_big
4
- truck_small
5
- truck_big
6
- car
7
- bike
8
- motorbike
9
- ignore_region
10
- tractor
11
- trailor
12
- wheelchair
13
- heavy_equipment
14
- pm
15
- umbrella
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
GT/task_day_pedestrian_crossing/gt/gt.txt DELETED
The diff for this file is too large to render. See raw diff
 
GT/task_day_pedestrian_crossing/gt/labels.txt DELETED
@@ -1,15 +0,0 @@
1
- person
2
- bus_small
3
- bus_big
4
- truck_small
5
- truck_big
6
- car
7
- bike
8
- motorbike
9
- ignore_region
10
- tractor
11
- trailor
12
- wheelchair
13
- heavy_equipment
14
- pm
15
- umbrella
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
GT/task_day_right_turn/gt/gt.txt DELETED
The diff for this file is too large to render. See raw diff
 
GT/task_day_right_turn/gt/labels.txt DELETED
@@ -1,15 +0,0 @@
1
- person
2
- bus_small
3
- bus_big
4
- truck_small
5
- truck_big
6
- car
7
- bike
8
- motorbike
9
- ignore_region
10
- tractor
11
- trailor
12
- wheelchair
13
- heavy_equipment
14
- pm
15
- umbrella
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
GT/task_day_right_turn_occlusion/gt/gt.txt DELETED
The diff for this file is too large to render. See raw diff
 
GT/task_day_right_turn_occlusion/gt/labels.txt DELETED
@@ -1,15 +0,0 @@
1
- person
2
- bus_small
3
- bus_big
4
- truck_small
5
- truck_big
6
- car
7
- bike
8
- motorbike
9
- ignore_region
10
- tractor
11
- trailor
12
- wheelchair
13
- heavy_equipment
14
- pm
15
- umbrella
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
GT/task_day_right_turn_pedestrian/gt/gt.txt DELETED
The diff for this file is too large to render. See raw diff
 
GT/task_day_right_turn_pedestrian/gt/labels.txt DELETED
@@ -1,15 +0,0 @@
1
- person
2
- bus_small
3
- bus_big
4
- truck_small
5
- truck_big
6
- car
7
- bike
8
- motorbike
9
- ignore_region
10
- tractor
11
- trailor
12
- wheelchair
13
- heavy_equipment
14
- pm
15
- umbrella
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
GT/task_night_far_objects/gt/gt.txt DELETED
The diff for this file is too large to render. See raw diff
 
GT/task_night_far_objects/gt/labels.txt DELETED
@@ -1,15 +0,0 @@
1
- person
2
- bus_small
3
- bus_big
4
- truck_small
5
- truck_big
6
- car
7
- bike
8
- motorbike
9
- ignore_region
10
- tractor
11
- trailor
12
- wheelchair
13
- heavy_equipment
14
- pm
15
- umbrella
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
GT/task_night_occlusion/gt/gt.txt DELETED
The diff for this file is too large to render. See raw diff
 
GT/task_night_occlusion/gt/labels.txt DELETED
@@ -1,15 +0,0 @@
1
- person
2
- bus_small
3
- bus_big
4
- truck_small
5
- truck_big
6
- car
7
- bike
8
- motorbike
9
- ignore_region
10
- tractor
11
- trailor
12
- wheelchair
13
- heavy_equipment
14
- pm
15
- umbrella
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
GT/task_night_occlusion_far_objects/gt/gt.txt DELETED
The diff for this file is too large to render. See raw diff
 
GT/task_night_occlusion_far_objects/gt/labels.txt DELETED
@@ -1,15 +0,0 @@
1
- person
2
- bus_small
3
- bus_big
4
- truck_small
5
- truck_big
6
- car
7
- bike
8
- motorbike
9
- ignore_region
10
- tractor
11
- trailor
12
- wheelchair
13
- heavy_equipment
14
- pm
15
- umbrella
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
GT/task_night_right_turn_pedestrian/gt/gt.txt DELETED
The diff for this file is too large to render. See raw diff
 
GT/task_night_right_turn_pedestrian/gt/labels.txt DELETED
@@ -1,15 +0,0 @@
1
- person
2
- bus_small
3
- bus_big
4
- truck_small
5
- truck_big
6
- car
7
- bike
8
- motorbike
9
- ignore_region
10
- tractor
11
- trailor
12
- wheelchair
13
- heavy_equipment
14
- pm
15
- umbrella
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
GT/task_night_right_turn_pedestrian_occlusion/gt/gt.txt DELETED
The diff for this file is too large to render. See raw diff
 
GT/task_night_right_turn_pedestrian_occlusion/gt/labels.txt DELETED
@@ -1,15 +0,0 @@
1
- person
2
- bus_small
3
- bus_big
4
- truck_small
5
- truck_big
6
- car
7
- bike
8
- motorbike
9
- ignore_region
10
- tractor
11
- trailor
12
- wheelchair
13
- heavy_equipment
14
- pm
15
- umbrella
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
GT/task_tunnel/gt/gt.txt DELETED
The diff for this file is too large to render. See raw diff
 
GT/task_tunnel/gt/labels.txt DELETED
@@ -1,15 +0,0 @@
1
- person
2
- bus_small
3
- bus_big
4
- truck_small
5
- truck_big
6
- car
7
- bike
8
- motorbike
9
- ignore_region
10
- tractor
11
- trailor
12
- wheelchair
13
- heavy_equipment
14
- pm
15
- umbrella
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Videos_/task_day_right_turn.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:024dc305add0da14d7d37c445c089f4f7ea003113c660acd4afca2ed1be18097
3
- size 17972349
 
 
 
 
Videos_/task_day_right_turn_occlusion.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:16414e766e0c3b721cbd573e4955e5a2fc9ca4b596d718dee963428cfb634822
3
- size 17795404
 
 
 
 
Videos_/task_day_right_turn_pedestrian.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:11949b92474ffd1b27b33617ca8f53a952c801cd00f4e0bec1fa9e12d5d5f1fe
3
- size 17085242
 
 
 
 
Videos_/task_night_far_objects.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c46a6698a0a86185317c236ac61aeb838a6223d98f4e66df0037576135470171
3
- size 29490160
 
 
 
 
Videos_/task_night_occlusion.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:627c0dc4ea2145538b19d1610c555eddc48740863c0155e998c3c1553ddebbba
3
- size 15835611
 
 
 
 
Videos_/task_night_right_turn_pedestrian.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:87ef2a06a722c2bebc0c5b7dd08b8072c9b22873f9e9d1dafd1836cb52a685f8
3
- size 16784463
 
 
 
 
Videos_/task_night_right_turn_pedestrian_occlusion.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:ad233e78a5da58e971afc38a13066992fef721e3f8f2a305cbf6164bad38515a
3
- size 18553799
 
 
 
 
Videos_/task_tunnel.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:213b8f7c82c2e7c6d12bda5190a341950471a332dcd81315103c2ee9088cc2e7
3
- size 31518293
 
 
 
 
convert_to_coco.py DELETED
@@ -1,104 +0,0 @@
1
- import os
2
- import json
3
- import cv2
4
- import numpy as np
5
-
6
- # Paths
7
- FRAMES_DIR = "test_frame"
8
- GT_DIR = "GT"
9
- OUT_PATH = "annotations"
10
- os.makedirs(OUT_PATH, exist_ok=True)
11
-
12
- # Output COCO-style JSON
13
- out_file = os.path.join(OUT_PATH, "train.json")
14
-
15
- out = {
16
- "images": [],
17
- "annotations": [],
18
- "videos": [],
19
- "categories": [
20
- {"id": 1, "name": "pedestrian"} # You can expand with more classes if needed
21
- ]
22
- }
23
-
24
- image_cnt = 0
25
- ann_cnt = 0
26
- video_cnt = 0
27
- tid_curr = 0
28
- tid_last = -1
29
-
30
- # Loop over sequences (one per video)
31
- for seq in sorted(os.listdir(FRAMES_DIR)):
32
- seq_path = os.path.join(FRAMES_DIR, seq)
33
- if not os.path.isdir(seq_path):
34
- continue
35
-
36
- video_cnt += 1
37
- out["videos"].append({"id": video_cnt, "file_name": seq})
38
-
39
- # Frames
40
- images = sorted([f for f in os.listdir(seq_path) if f.endswith(".jpg")])
41
- num_images = len(images)
42
-
43
- for i, img_name in enumerate(images):
44
- img_path = os.path.join(seq_path, img_name)
45
- img = cv2.imread(img_path)
46
- if img is None:
47
- continue
48
- height, width = img.shape[:2]
49
-
50
- image_info = {
51
- "file_name": f"{seq}/{img_name}",
52
- "id": image_cnt + i + 1,
53
- "frame_id": i + 1,
54
- "prev_image_id": image_cnt + i if i > 0 else -1,
55
- "next_image_id": image_cnt + i + 2 if i < num_images - 1 else -1,
56
- "video_id": video_cnt,
57
- "height": height,
58
- "width": width
59
- }
60
- out["images"].append(image_info)
61
-
62
- # Load GT file
63
- gt_path = os.path.join(GT_DIR, seq, "gt", "gt.txt")
64
- if not os.path.exists(gt_path):
65
- print(f" No GT found for {seq}, skipping annotations.")
66
- image_cnt += num_images
67
- continue
68
-
69
- anns = np.loadtxt(gt_path, dtype=np.float32, delimiter=",")
70
-
71
- for i in range(anns.shape[0]):
72
- frame_id = int(anns[i][0])
73
- track_id = int(anns[i][1])
74
- x, y, w, h = anns[i][2:6]
75
- conf = anns[i][6]
76
- class_id = int(anns[i][7])
77
- visibility = anns[i][8]
78
-
79
- ann_cnt += 1
80
- if track_id != tid_last:
81
- tid_curr += 1
82
- tid_last = track_id
83
-
84
- ann = {
85
- "id": ann_cnt,
86
- "category_id": class_id,
87
- "image_id": image_cnt + frame_id,
88
- "track_id": tid_curr,
89
- "bbox": [float(x), float(y), float(w), float(h)],
90
- "conf": float(conf),
91
- "iscrowd": 0,
92
- "area": float(w * h),
93
- }
94
- out["annotations"].append(ann)
95
-
96
- image_cnt += num_images
97
-
98
- print(f" Loaded {len(out['images'])} images and {len(out['annotations'])} annotations.")
99
-
100
- # Save JSON
101
- with open(out_file, "w") as f:
102
- json.dump(out, f)
103
-
104
- print(f" Saved COCO-style annotations to {out_file}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
extract_frames.py DELETED
@@ -1,60 +0,0 @@
1
- import os
2
- import cv2
3
- import numpy as np
4
-
5
- # Paths
6
- videos_dir = "test_vid"
7
- frames_dir = "test_frame"
8
-
9
- # Define how many frames to extract for each video (should be same in GT file last row)
10
- frames_to_extract = {
11
- "task_day_left_turn-2024_07_31_02_12_05-mot 1.1.mp4": 1965,
12
- # add more here...
13
- }
14
-
15
- os.makedirs(frames_dir, exist_ok=True)
16
-
17
- for video_file in os.listdir(videos_dir):
18
- if video_file.lower().endswith(".mp4"):
19
- video_path = os.path.join(videos_dir, video_file)
20
-
21
- # Subdirectory name (remove .mp4)
22
- subdir_name = os.path.splitext(video_file)[0]
23
- subdir_path = os.path.join(frames_dir, subdir_name)
24
- os.makedirs(subdir_path, exist_ok=True)
25
-
26
- cap = cv2.VideoCapture(video_path)
27
- total_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
28
- desired_frames = frames_to_extract.get(video_file, total_frames)
29
-
30
- saved = 0
31
- frames = []
32
-
33
- while True:
34
- ret, frame = cap.read()
35
- if not ret:
36
- break
37
- frames.append(frame)
38
-
39
- cap.release()
40
-
41
-
42
- if desired_frames > len(frames):
43
- last_frame = frames[-1]
44
- while len(frames) < desired_frames:
45
- frames.append(last_frame)
46
-
47
-
48
- if desired_frames < len(frames):
49
- indices = np.linspace(0, len(frames) - 1, desired_frames, dtype=int)
50
- frames = [frames[i] for i in indices]
51
-
52
-
53
- for idx, frame in enumerate(frames):
54
- frame_filename = os.path.join(subdir_path, f"frame_{idx:05d}.jpg")
55
- cv2.imwrite(frame_filename, frame)
56
- saved += 1
57
-
58
- print(f"Extracted {saved} frames from {video_file} into {subdir_name}/")
59
-
60
- print(" Done extracting frames for all videos.")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
train/task_day_left_turn.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18c060aec288d8790ecfbd89bb7c1068f16427672da6f9ea6e0c4138dcd38560
3
+ size 1608160074
train/task_day_occlusion.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:33ab4cd7986c360968836b8a99a9603c8acee433abc186c155064eb7b8530dad
3
+ size 1571091360
train/task_day_pedestrian_crossing.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e5b9d960b8966ffd2e65a880983cdd249a37522184f081477da20a0276c324a
3
+ size 1379301049
train/task_day_right_turn.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d06ac3702da134f9f4bf6d1d306b1eb530ab09a3be256e6d24784ec440b5afe
3
+ size 1299660850
train/task_day_right_turn_occlusion.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63d16f864e72e62e52773cb2f303c55a88fed831099055739f0f5d07b982ae6f
3
+ size 1639623106
train/task_day_right_turn_pedestrian.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4fc0f44e5b2f927c6ebb56c8ae853f874c55c533253aef2e56bf634944102947
3
+ size 1554372760
Videos_/night_occlusion_far_objects.mp4 → train/task_night_far_objects.zip RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9eff2bb95e195a14f7a2b9cf83e7a10e85a7cef22a36a87719fd6dd0c9157cb0
3
- size 29183584
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7229a4d32d05d0c9079075fe0c1e0fe8e189a6a41ec291c5231ddeff6bf5b5d3
3
+ size 688640068
Videos_/task_day_left_turn.mp4 → train/task_night_occlusion.zip RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b4fde5aefb66ffd282e35ef0217a52c8d59acf373314d1aac9d4468fcc65b823
3
- size 19418590
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e94fd05089bc276768224d2571b8aab84cdf3506e0a5e2c15043e904c3aca192
3
+ size 985174903
Videos_/task_day_occlusion.mp4 → train/task_night_occlusion_far_objects.zip RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0b2ce1fe23c6615aafa738244cc942464f79d6df87d5600ba4a49692ec74b0db
3
- size 17578267
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cd4ecd2e6dd52986812930666a02adad1541a9c3484094a3552509de5a2a026
3
+ size 664973449
train/task_night_right_turn_pedestrian.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8a7c71cbbe7aa7b4a3908d227a77600d0c03bea2b330b6d7da6234df35f0556c
3
+ size 1403856209
train/task_night_right_turn_pedestrian_occlusion.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b84978f21611a54b96548991effea467ae9064ff967939c9b0640197fb65018e
3
+ size 1412154558
Videos_/task_day_pedestrian_crossing.mp4 → train/task_tunnel.zip RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:365ffbaf54424f7e303a0fc71ba3dfd97dcd24dadfac08d64d08e41b61ff79ca
3
- size 16706342
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5daa3c2ad1cff3a7681b7ce28d6a4c176aaaa4e9282bd6fbb4de5401738e6a5a
3
+ size 549196007