Parcourir la source

add privilieged option in detect_new_folder

master
Jeong Geol Kim il y a 4 ans
Parent
révision
9a2ca79c32
2 fichiers modifiés avec 15 ajouts et 15 suppressions
  1. 1
    1
      detect_new_folder.py
  2. 14
    14
      kpi.py

+ 1
- 1
detect_new_folder.py Voir le fichier

17
     tmp_recent = str(root_path) + str(recent_file[0])
17
     tmp_recent = str(root_path) + str(recent_file[0])
18
     if target_dir != tmp_recent:
18
     if target_dir != tmp_recent:
19
         time.sleep(5)
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
         os.system(str(command))        
21
         os.system(str(command))        
22
     target_dir = str(root_path) + str(recent_file[0])    
22
     target_dir = str(root_path) + str(recent_file[0])    
23
     
23
     

+ 14
- 14
kpi.py Voir le fichier

6
 import pandas as pd
6
 import pandas as pd
7
 from pandas import DataFrame as df
7
 from pandas import DataFrame as df
8
 from sklearn.cluster import DBSCAN
8
 from sklearn.cluster import DBSCAN
9
-import matplotlib.pyplot as plt
9
+#import matplotlib.pyplot as plt
10
 
10
 
11
 
11
 
12
 ssd_dir = str(sys.argv[1])
12
 ssd_dir = str(sys.argv[1])
115
     norm['stroke_count'] = 0
115
     norm['stroke_count'] = 0
116
     stroke_count(norm)
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
     #print(norm['stroke_count'].unique())
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
     quad2_c = quad_count[quad_count['quad'] == 2]
137
     quad2_c = quad_count[quad_count['quad'] == 2]
138
     quad3_c = quad_count[quad_count['quad'] == 3]
138
     quad3_c = quad_count[quad_count['quad'] == 3]
139
     quad4_c = quad_count[quad_count['quad'] == 4]
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
     kpi['PK'] = ssd_dir[5:] 
145
     kpi['PK'] = ssd_dir[5:] 
146
     kpi['qaud1_c'] = len(quad1_c)
146
     kpi['qaud1_c'] = len(quad1_c)
147
     kpi['qaud2_c'] = len(quad2_c)
147
     kpi['qaud2_c'] = len(quad2_c)
164
     }
164
     }
165
 
165
 
166
 
166
 
167
-    print(kpi)
167
+    #print(kpi)
168
     val_list = []
168
     val_list = []
169
 
169
 
170
     #PK =
170
     #PK =
191
     val_list.append("{:.4f}".format((kpi_1['depth'][2] + kpi_1['depth'][3] - kpi_1['depth'][0] - kpi_1['depth'][1])/2))
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
 

Chargement…
Annuler
Enregistrer