-
Notifications
You must be signed in to change notification settings - Fork 1
/
code.txt
22 lines (19 loc) · 934 Bytes
/
code.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Print results
emptycount=0
occucount=0
for c in det[:, -1].unique():
n = (det[:, -1] == c).sum() # detections per class
s += f"{n} {names[int(c)]}{'s' * (n > 1)}, " # add to string
type1=c.tolist()
type1=int(type1)
typelist=[int(x) for x in str(type1)]
count=n.tolist()
countlist = [int(x) for x in str(count)]
if(typelist[0]==0):
emptycount=countlist[0]
else:
occucount=countlist[0]
from pandas import DataFrame
Data = {'Empty': [str(emptycount)],'Occupied': [str(occucount)]}
df = DataFrame(Data)
df.to_csv('parking.csv')