Преглед изворни кода

add privilieged option in detect_new_folder

master
Jeong Geol Kim пре 4 година
родитељ
комит
9a2ca79c32
2 измењених фајлова са 15 додато и 15 уклоњено
  1. 1
    1
      detect_new_folder.py
  2. 14
    14
      kpi.py

+ 1
- 1
detect_new_folder.py Прегледај датотеку

@@ -17,7 +17,7 @@ while True:
17 17
     tmp_recent = str(root_path) + str(recent_file[0])
18 18
     if target_dir != tmp_recent:
19 19
         time.sleep(5)
20
-        command = 'docker run --rm --name mail_recorder --gpus '"device=1"' -v /dev:/dev -v /home/mc365/sources:/sources -v /home/mc365/data/'+str(recent_file[0])+':/data/'+str(recent_file[0])+' stereolabs/zed:3.5-gl-devel-cuda11.1-ubuntu18.04 python3 /sources/recorder.py.bak'
20
+        command = 'docker run --rm --name mail_recorder --gpus '"device=1"' --privileged -v /dev:/dev -v /home/mc365/sources:/sources -v /home/mc365/data/'+str(recent_file[0])+':/data/'+str(recent_file[0])+' stereolabs/zed:3.5-gl-devel-cuda11.1-ubuntu18.04 python3 /sources/recorder.py.bak'
21 21
         os.system(str(command))        
22 22
     target_dir = str(root_path) + str(recent_file[0])    
23 23
     

+ 14
- 14
kpi.py Прегледај датотеку

@@ -6,7 +6,7 @@ import numpy as np
6 6
 import pandas as pd
7 7
 from pandas import DataFrame as df
8 8
 from sklearn.cluster import DBSCAN
9
-import matplotlib.pyplot as plt
9
+#import matplotlib.pyplot as plt
10 10
 
11 11
 
12 12
 ssd_dir = str(sys.argv[1])
@@ -115,17 +115,17 @@ def dist():
115 115
     norm['stroke_count'] = 0
116 116
     stroke_count(norm)
117 117
     
118
-    print('num of inc')
119
-    print(norm['inc_num'].unique())
118
+    #print('num of inc')
119
+    #print(norm['inc_num'].unique())
120 120
 
121
-    print('total stroke')
121
+    #print('total stroke')
122 122
     #print(norm['stroke_count'].unique())
123
-    print(norm)
123
+    #print(norm)
124 124
 
125 125
     
126 126
 
127
-    plt.plot(norm['frame'],norm['diff_diff'])
128
-    plt.savefig('/sources/diff_diff.png')
127
+    #plt.plot(norm['frame'],norm['diff_diff'])
128
+    #plt.savefig('/sources/diff_diff.png')
129 129
 
130 130
 
131 131
 
@@ -137,11 +137,11 @@ def dist():
137 137
     quad2_c = quad_count[quad_count['quad'] == 2]
138 138
     quad3_c = quad_count[quad_count['quad'] == 3]
139 139
     quad4_c = quad_count[quad_count['quad'] == 4]
140
-    print(len(quad1_c))
141
-    print(len(quad2_c))
142
-    print(len(quad3_c))
143
-    print(len(quad4_c))
144
-    print(quad1_c)
140
+    #print(len(quad1_c))
141
+    #print(len(quad2_c))
142
+    #print(len(quad3_c))
143
+    #print(len(quad4_c))
144
+    #print(quad1_c)
145 145
     kpi['PK'] = ssd_dir[5:] 
146 146
     kpi['qaud1_c'] = len(quad1_c)
147 147
     kpi['qaud2_c'] = len(quad2_c)
@@ -164,7 +164,7 @@ def dist():
164 164
     }
165 165
 
166 166
 
167
-    print(kpi)
167
+    #print(kpi)
168 168
     val_list = []
169 169
 
170 170
     #PK =
@@ -191,7 +191,7 @@ def dist():
191 191
     val_list.append("{:.4f}".format((kpi_1['depth'][2] + kpi_1['depth'][3] - kpi_1['depth'][0] - kpi_1['depth'][1])/2))
192 192
 
193 193
 
194
-    print(val_list)
194
+    #print(val_list)
195 195
 
196 196
 
197 197
 

Loading…
Откажи
Сачувај