-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c5750e
commit 6f1d6d4
Showing
5 changed files
with
199 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
Exp ID,Cars,Duration(Minutes),Good Illumination,Viewpoint #,Notes | ||
15,r,5,1,0, | ||
18,g,5,1,0, | ||
19,g,5,1,1, | ||
20,g,5,1,1, | ||
21,g,5,1,1, | ||
22,r,5,1,1, | ||
24,r,5,1,2,"(24,25,26): same node 1" | ||
25,g,5,1,3,"(24,25): only node 2 changed" | ||
26,g,5,1,4,"(25,26): only node 3 changed" | ||
27,g,5,1,5, | ||
28,r,5,1,6, | ||
29,r,5,1,7, | ||
32,r,5,1,8, | ||
33,r,5,1,9, | ||
34,r,5,1,9, | ||
41,r,5,1,10, | ||
42,r,10,1,10, | ||
43,r,10,1,10, | ||
44,g,10,1,10, | ||
45,g,10,1,11, | ||
46,r,10,1,11,"(45,46): minimal viewpoint change due to car hit" | ||
47,g,10,1,11, | ||
48,g,5,1,12, | ||
49,g,5,1,12, | ||
50,r,5,1,12, | ||
51,r,5,1,12, | ||
53,g,5,1,13,"(51,53): major change in node1, minor change in node2/3" | ||
54,g,5,1,14, | ||
55,g,5,1,14, | ||
56,g,5,1,14, | ||
57,r,5,1,14, | ||
58,r,5,1,14, | ||
59,r,5,1,14, | ||
61,g,10,1,15, | ||
63,r,10,1,15, | ||
64,r,10,1,15, | ||
65,r,10,1,16, | ||
66,r,10,1,16, | ||
67,g,10,1,16, | ||
70,r,10,1,17, | ||
72,r,10,1,18, | ||
73,g,20,1,18, | ||
74,g,10,1,19,"(74,75): minimal viewpoint change due to car hit" | ||
75,r,10,1,19, | ||
76,r,10,1,19, | ||
77,r,10,1,20, | ||
78,g,20,1,20, | ||
85,rg,10,1,21, | ||
90,r,15,0,21, | ||
91,g,25,0,21, | ||
92,g,10,0,22, | ||
95,r,10,0,22, | ||
96,rg,10,1,23, | ||
100,rg,10,1,24, | ||
102,r,10,0,24, | ||
103,rg,5,1,24, | ||
104,r,10,0,24, | ||
105,r,15,0,24, | ||
106,r,10,0,25, | ||
107,rg,10,1,25, | ||
108,rg,10,1,25, | ||
109,r,10,1,25, | ||
111,r,10,0,26, | ||
112,r,10,0,26, | ||
113,r,10,0,26, | ||
115,rg,10,1,26, | ||
119,r,10,0,27, | ||
123,r,10,0,28, | ||
124,r,10,0,28, | ||
125,r,10,0,28, | ||
126,r,5,0,28, | ||
127,rg,10,1,28, | ||
129,rg,20,1,28, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import numpy as np | ||
import cv2 | ||
import os | ||
from skimage import metrics | ||
from tqdm import tqdm | ||
import matplotlib.pyplot as plt | ||
|
||
metadata = [] | ||
with open("dataset_metadata.csv", "r") as fp: | ||
metarows = fp.readlines() | ||
for i in range(1,len(metarows)): # skip row 1 | ||
temp = metarows[i].strip().split(",") | ||
if temp[4] == '1' and (temp[1]=="r" or temp[1]=="g"): | ||
# select good illunimation + one car | ||
metadata.append([eval(temp[0]), eval(temp[3])]) | ||
metadata = np.array(metadata) | ||
# for each in metadata: | ||
# print(each[0]) | ||
|
||
fig, axs = plt.subplots(nrows=6, ncols=3, figsize=(85,110)) | ||
|
||
data_to_look_at = [26, 39, 41, 45] # put the viewpoints you would like to visually inspect | ||
for i in range(len(data_to_look_at)): | ||
v1 = metadata[data_to_look_at[i],0] | ||
for node1 in range(3): | ||
curr_node1 = "node" + str(node1+1) | ||
rootdir = "PATH_TO_DATASET" | ||
# Example folder structure | ||
# --- | ||
# ─── PATH_TO_DATASET/ | ||
# ├── data15 | ||
# │ ├── node1/ | ||
# │ ├── node2/ | ||
# | ├── node3/ | ||
# | ├── metadata.json | ||
# │ └── mocap.hdf5 | ||
# ├── data16 | ||
# └── ... | ||
rootfolder = os.path.join(rootdir+str(v1),curr_node1) | ||
filelist = os.listdir(rootfolder) | ||
fname1 = "" | ||
for each in filelist: | ||
if "realsense_rgb" in each: # use realsense_depth if using low lighing conditions | ||
fname1 = os.path.join(rootfolder, each) | ||
break | ||
|
||
vidcap = cv2.VideoCapture(fname1) | ||
success,image1 = vidcap.read() | ||
count = 0 | ||
success = True | ||
while success: | ||
success,image1 = vidcap.read() | ||
count += 1 | ||
if count>500: | ||
break | ||
image1 = cv2.cvtColor(image1, cv2.COLOR_BGR2RGB) | ||
ax = axs[i][node1] | ||
ax.imshow(image1) | ||
plt.show() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
|
||
cp data/raw/metadata.json data/processed | ||
python3 src/convert_optitrack.py data/processed/aligned.csv data/processed/metadata.json data/processed |