Zai commited on
Commit
06db6e9
1 Parent(s): f0ce670
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. DataPreparation/1.tf_train.py +102 -0
  2. DataPreparation/2.data_train_converted.py +32 -0
  3. DataPreparation/3.rNum_train.py +20 -0
  4. DataPreparation/4.data_train_eNum.py +32 -0
  5. DataPreparation/5.data_test_converted.py +31 -0
  6. DataPreparation/6.cluster.py +38 -0
  7. DataPreparation/README.md +89 -0
  8. DataPreparation/config.py +1 -0
  9. DataPreparation/data/test.txt +2880 -0
  10. DataPreparation/data/train.txt +0 -0
  11. Dockerfile +21 -0
  12. Graph2plan +1 -0
  13. Interface/House/__init__.py +0 -0
  14. Interface/House/__pycache__/__init__.cpython-311.pyc +0 -0
  15. Interface/House/__pycache__/__init__.cpython-37.pyc +0 -0
  16. Interface/House/__pycache__/settings.cpython-311.pyc +0 -0
  17. Interface/House/__pycache__/settings.cpython-37.pyc +0 -0
  18. Interface/House/__pycache__/urls.cpython-311.pyc +0 -0
  19. Interface/House/__pycache__/urls.cpython-37.pyc +0 -0
  20. Interface/House/__pycache__/wsgi.cpython-37.pyc +0 -0
  21. Interface/House/asgi.py +16 -0
  22. Interface/House/settings.py +127 -0
  23. Interface/House/urls.py +37 -0
  24. Interface/House/wsgi.py +16 -0
  25. Interface/Houseweb/__init__.py +0 -0
  26. Interface/Houseweb/__pycache__/__init__.cpython-311.pyc +0 -0
  27. Interface/Houseweb/__pycache__/__init__.cpython-37.pyc +0 -0
  28. Interface/Houseweb/__pycache__/create.cpython-37.pyc +0 -0
  29. Interface/Houseweb/__pycache__/floorplan2.cpython-37.pyc +0 -0
  30. Interface/Houseweb/__pycache__/network.cpython-37.pyc +0 -0
  31. Interface/Houseweb/__pycache__/utils.cpython-37.pyc +0 -0
  32. Interface/Houseweb/__pycache__/utils1.cpython-37.pyc +0 -0
  33. Interface/Houseweb/__pycache__/views.cpython-311.pyc +0 -0
  34. Interface/Houseweb/__pycache__/views.cpython-37.pyc +0 -0
  35. Interface/Houseweb/admin.py +3 -0
  36. Interface/Houseweb/apps.py +5 -0
  37. Interface/Houseweb/migrations/__init__.py +0 -0
  38. Interface/Houseweb/models.py +3 -0
  39. Interface/Houseweb/tests.py +3 -0
  40. Interface/Houseweb/views.py +757 -0
  41. Interface/Img/data.mat.png +0 -0
  42. Interface/Img/data_test_converted.png +0 -0
  43. Interface/Img/data_train_converted.png +0 -0
  44. Interface/Img/interface.jpg +0 -0
  45. Interface/Img/paper.png +0 -0
  46. Interface/align_fp/align_adjacent_room3.m +121 -0
  47. Interface/align_fp/align_fp.m +108 -0
  48. Interface/align_fp/align_neighbor.m +53 -0
  49. Interface/align_fp/align_with_boundary.m +29 -0
  50. Interface/align_fp/find_close_seg.m +74 -0
DataPreparation/1.tf_train.py ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import pickle
3
+ import numpy as np
4
+ import scipy.io as sio
5
+ from config import data_path
6
+ from tqdm.auto import tqdm
7
+
8
+ def compute_tf(boundary):
9
+ '''
10
+ input: boundary points array (x,y,dir,isNew)
11
+ return: tf.x, tf.y
12
+ '''
13
+ if boundary.shape[1]>2:
14
+ boundary=boundary[:,:2]
15
+ boundary = np.concatenate((boundary,boundary[:1]))
16
+ num_point = len(boundary)-1
17
+ line_vector = boundary[1:]-boundary[:-1]
18
+ line_length = np.linalg.norm(line_vector,axis=1)
19
+
20
+ perimeter = line_length.sum()
21
+ line_vector = line_vector/perimeter
22
+ line_length = line_length/perimeter
23
+
24
+ angles = np.zeros(num_point)
25
+ for i in range(num_point):
26
+ z = np.cross(line_vector[i],line_vector[(i+1)%num_point])
27
+ sign = np.sign(z)
28
+ angles[i] = np.arccos(np.dot(line_vector[i],line_vector[(i+1)%num_point]))*sign
29
+
30
+ x = np.zeros(num_point+1)
31
+ y = np.zeros(num_point+1)
32
+ s = 0
33
+ for i in range(1,num_point+1):
34
+ x[i] = line_length[i-1]+x[i-1]
35
+ y[i-1] = angles[i-1]+s
36
+ s = y[i-1]
37
+ y[-1] = s
38
+ return x,y
39
+
40
+ def compute_tf_dist(tf1,tf2):
41
+ x = np.unique(np.concatenate((tf1['x'],tf2['x'])))
42
+ dist = 0
43
+ idx1,idx2 =0,0
44
+ for i in range(1,len(x)-1):
45
+ idx1 = idx1+(x[i]>tf1['x'][idx1+1])
46
+ idx2 = idx2+(x[i]>tf2['x'][idx2+1])
47
+ seg = x[i]-x[i-1]
48
+ d = abs(tf1['y'][idx1]-tf2['y'][idx2])
49
+ dist = dist+seg*d
50
+ seg = x[-1]-x[-2]
51
+ d = abs(tf1['y'][-1]-tf2['y'][-1])
52
+ dist = dist+seg*d
53
+ return dist
54
+
55
+ def sample_tf(x,y,ndim=1000):
56
+ '''
57
+ input: tf.x,tf.y, ndim
58
+ return: n-dim tf values
59
+ '''
60
+ t = np.linspace(0,1,ndim)
61
+ return np.piecewise(t,[t>=xx for xx in x],y)
62
+
63
+ # load data
64
+ data = sio.loadmat(data_path, squeeze_me=True, struct_as_record=False)['data']
65
+ data_dict = {d.name:d for d in data}
66
+
67
+ names_train = open('./data/train.txt').read().split('\n')
68
+ names_test = open('./data/test.txt').read().split('\n')
69
+ n_train = len(names_train)
70
+ n_test = len(names_test)
71
+
72
+ # turning function: training data
73
+ trainTF = []
74
+ tf_train = []
75
+ for i in tqdm(range(n_train)):
76
+ boundary = data_dict[names_train[i]].boundary
77
+ x,y = compute_tf(boundary)
78
+ trainTF.append({'x':x,'y':y})
79
+ pickle.dump(trainTF,open('./data/trainTF.pkl','wb'))
80
+
81
+ tf_train = []
82
+ for i in tqdm(range(n_train)):
83
+ x,y = trainTF[i]['x'],trainTF[i]['y']
84
+ tf_train.append(sample_tf(x,y))
85
+ tf_train = np.stack(tf_train,axis=0)
86
+ np.save('./data/tf_train.npy',tf_train)
87
+
88
+ # turning function: testing data
89
+ testTF = []
90
+ for i in tqdm(range(n_test)):
91
+ boundary = data_dict[names_test[i]].boundary
92
+ x,y = compute_tf(boundary)
93
+ testTF.append({'x':x,'y':y})
94
+ pickle.dump(testTF,open('./data/testTF.pkl','wb'))
95
+
96
+ # turning function distance: test-train
97
+ print('Computing turning function distance ... it will take a long time.')
98
+ D_test_train = np.zeros((n_test,n_train),dtype='float32')
99
+ for i in tqdm(range(n_test)):
100
+ for j in range(n_train):
101
+ D_test_train[i,j] = compute_tf_dist(testTF[i],trainTF[j])
102
+ np.save('./data/D_test_train.npy',D_test_train)
DataPreparation/2.data_train_converted.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import pickle
3
+ import scipy.io as sio
4
+ from config import data_path
5
+ from tqdm.auto import tqdm
6
+
7
+ # load data
8
+ data = sio.loadmat(data_path, squeeze_me=True, struct_as_record=False)['data']
9
+ data_dict = {d.name:d for d in data}
10
+
11
+ names_train = open('./data/train.txt').read().split('\n')
12
+ n_train = len(names_train)
13
+
14
+ trainTF = pickle.load(open('./data/trainTF.pkl','rb'))
15
+
16
+ data_converted = []
17
+
18
+ for i in tqdm(range(n_train)):
19
+ d = data_dict[names_train[i]]
20
+ d_converted = {}
21
+ d_converted['name'] = d.name
22
+ d_converted['boundary'] = d.boundary
23
+ d_converted['box'] = np.concatenate([d.gtBoxNew,d.rType[:,None]],axis=-1)
24
+ d_converted['order'] = d.order
25
+ d_converted['edge'] = d.rEdge
26
+ d_converted['rBoundary'] = d.rBoundary
27
+ data_converted.append(d_converted)
28
+
29
+ sio.savemat('./data/data_train_converted.mat',{'data':data_converted,'nameList':names_train,'trainTF':trainTF})
30
+ data = sio.loadmat('./data/data_train_converted.mat', squeeze_me=True, struct_as_record=False)
31
+ pickle.dump(data,open('./data/data_train_converted.pkl','wb'))
32
+
DataPreparation/3.rNum_train.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import numpy as np
3
+ import scipy.io as sio
4
+ from config import data_path
5
+ from tqdm.auto import tqdm
6
+
7
+ data = sio.loadmat(data_path, squeeze_me=True, struct_as_record=False)['data']
8
+ data_dict = {d.name:d for d in data}
9
+
10
+ names_train = open('./data/train.txt').read().split('\n')
11
+ n_train = len(names_train)
12
+
13
+ rNum = np.zeros((n_train,14),dtype='uint8')
14
+ for i in tqdm(range(n_train)):
15
+ rType = data_dict[names_train[i]].rType
16
+ for j in range(13):
17
+ rNum[i,j] = (rType==j).sum()
18
+ rNum[i,13] = rNum[i,[1,5,6,7,8]].sum()
19
+
20
+ np.save('./data/rNum_train.npy',rNum)
DataPreparation/4.data_train_eNum.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from os import rmdir
2
+ import numpy as np
3
+ import pickle
4
+ import scipy.io as sio
5
+ from tqdm.auto import tqdm
6
+
7
+ data = pickle.load(open('./data/data_train_converted.pkl','rb'))['data']
8
+ names_train = open('./data/train.txt').read().split('\n')
9
+ n_train = len(names_train)
10
+
11
+ eNum = np.zeros((n_train,25),dtype='uint8')
12
+ for i in tqdm(range(n_train)):
13
+ d = data[i]
14
+ rType = d.box[:,-1]
15
+ eType = rType[d.edge[:,:2]]
16
+ # classfication
17
+ rMap = np.array([1,2,3,4,1,2,2,2,2,5,1,6,1,10,7,8,9,10])-1 # matlab to python
18
+ edge = rMap[eType]
19
+ reorder = np.array([0,1,3,2,4,5])
20
+ edge = reorder[edge]
21
+ I = (edge[:,0]<=5)&(edge[:,0]>=1)&(edge[:,1]<=5)&(edge[:,1]>=1)
22
+ edge = edge[I,:]-1 # matlab to python
23
+ e = np.zeros((5,5),dtype='uint8')
24
+ for j in range(len(edge)):
25
+ e[edge[j,0],edge[j,1]] = e[edge[j,0],edge[j,1]]+1
26
+ if edge[j,0] != edge[j,1]:
27
+ e[edge[j,1],edge[j,0]] = e[edge[j,1],edge[j,0]]+1
28
+
29
+ eNum[i] = e.reshape(-1)
30
+
31
+ pickle.dump({'eNum':eNum},open('./data/data_train_eNum.pkl','wb'))
32
+
DataPreparation/5.data_test_converted.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import pickle
3
+ import scipy.io as sio
4
+ from config import data_path
5
+ from tqdm.auto import tqdm
6
+
7
+ data = sio.loadmat(data_path, squeeze_me=True, struct_as_record=False)['data']
8
+ data_dict = {d.name:d for d in data}
9
+ testTF = pickle.load(open('./data/testTF.pkl','rb'))
10
+ rNum = np.load('./data/rNum_train.npy')
11
+
12
+ names_train = open('./data/train.txt').read().split('\n')
13
+ names_test = open('./data/test.txt').read().split('\n')
14
+ n_train = len(names_train)
15
+ n_test = len(names_test)
16
+
17
+ D = np.load('./data/D_test_train.npy')
18
+ data_converted = []
19
+ for i in tqdm(range(n_test)):
20
+ d = data_dict[names_test[i]]
21
+ d_converted = {}
22
+ d_converted['boundary'] = d.boundary
23
+ d_converted['tf'] = testTF[i]
24
+ topK = np.argsort(D[i])[:1000]
25
+ d_converted['topK'] = topK
26
+ d_converted['topK_rNum'] = rNum[topK]
27
+ data_converted.append(d_converted)
28
+
29
+ sio.savemat('./data/data_test_converted.mat',{'data':data_converted,'testNameList':names_test,'trainNameList':names_train})
30
+ data = sio.loadmat('./data/data_test_converted.mat', squeeze_me=True, struct_as_record=False)
31
+ pickle.dump(data,open('./data/data_test_converted.pkl','wb'))
DataPreparation/6.cluster.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pickle
2
+ import numpy as np
3
+ import faiss
4
+ from tqdm.auto import tqdm
5
+
6
+ def sample_tf(x,y,ndim=1000):
7
+ '''
8
+ input: tf.x,tf.y, ndim
9
+ return: n-dim tf values
10
+ '''
11
+ t = np.linspace(0,1,ndim)
12
+ return np.piecewise(t,[t>=xx for xx in x],y)
13
+
14
+ tf_train = pickle.load(open('./data/trainTF.pkl','rb'))
15
+
16
+ tf = []
17
+ for i in tqdm(range(len(tf_train))):
18
+ tf_i = tf_train[i]
19
+ tf.append(sample_tf(tf_i['x'],tf_i['y']))
20
+
21
+ d = 1000
22
+ tf = np.array(tf).astype(np.float32)
23
+
24
+ ncentroids = 1000
25
+ niter = 200
26
+ verbose = True
27
+
28
+ kmeans = faiss.Kmeans(d, ncentroids, niter=niter, verbose=verbose,gpu=True)
29
+ kmeans.train(tf)
30
+ centroids = kmeans.centroids
31
+
32
+ index = faiss.IndexFlatL2(d)
33
+ index.add(tf)
34
+ nNN = 1000
35
+ D, I = index.search (kmeans.centroids, nNN)
36
+
37
+ np.save(f'./data/centroids_train.npy',centroids)
38
+ np.save(f'./data/clusters_train.npy',I)
DataPreparation/README.md ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ **1. Data from RPLAN to Graph2Plan**
2
+
3
+ Please refer to https://github.com/zzilch/RPLAN-Toolbox.
4
+ You can also download the extracted data from [here](http://vcc.tech/file/upload_file/Data/G2P/Data.7z).
5
+ You can load the `Network/data/data.mat` in Matlab to chek the data structure.
6
+
7
+ ![data.mat](../Interface/Img/data.mat.png)
8
+
9
+ Data fields:
10
+
11
+ - name: file name in RPLAN
12
+ - boundary: (x,y,dir,isNew)
13
+ - first two point indicate the front door.
14
+ - dir: 0(right)/1(down)/2(left)/3(up) for `dir`.
15
+ - `isNew` means the point is not a corner point (usually a point of door)
16
+ - order: room order, the larger one will cover the smaller one.
17
+ - rType: room categories
18
+ ```
19
+ # index,name,type(private/public),floorTexture
20
+ room_label = [
21
+ (0, 'LivingRoom', 1, "PublicArea"),
22
+ (1, 'MasterRoom', 0, "Bedroom"),
23
+ (2, 'Kitchen', 1, "FunctionArea"),
24
+ (3, 'Bathroom', 0, "FunctionArea"),
25
+ (4, 'DiningRoom', 1, "FunctionArea"),
26
+ (5, 'ChildRoom', 0, "Bedroom"),
27
+ (6, 'StudyRoom', 0, "Bedroom"),
28
+ (7, 'SecondRoom', 0, "Bedroom"),
29
+ (8, 'GuestRoom', 0, "Bedroom"),
30
+ (9, 'Balcony', 1, "PublicArea"),
31
+ (10, 'Entrance', 1, "PublicArea"),
32
+ (11, 'Storage', 0, "PublicArea"),
33
+ (12, 'Wall-in', 0, "PublicArea"),
34
+ (13, 'External', 0, "External"),
35
+ (14, 'ExteriorWall', 0, "ExteriorWall"),
36
+ (15, 'FrontDoor', 0, "FrontDoor"),
37
+ (16, 'InteriorWall', 0, "InteriorWall"),
38
+ (17, 'InteriorDoor', 0, "InteriorDoor")
39
+ ]
40
+ ```
41
+ - rBoundary: (x,y), boundary points for each room
42
+ - gtBox: (y0,x0,y1,x1), min-max bounds of a room [RPLAN]
43
+ - gtBoxNew: (x0,y0,x1,y1), min-max bounds of a room [Graph2Plan]
44
+ - rEdge: (u,v,r), room indices and relative position(u relative to v)
45
+ ```
46
+ edge_type = [
47
+ 'left-above',
48
+ 'left-below',
49
+ 'left-of',
50
+ 'above',
51
+ 'inside',
52
+ 'surrounding',
53
+ 'below',
54
+ 'right-of',
55
+ 'right-above',
56
+ 'right-below'
57
+ ]
58
+ ```
59
+
60
+ **2. Data from Network to GUI**
61
+
62
+ We provide scripts to create the same data as we provided in Interface. Like DeepLayout, we use 75k for training and about 3k for validation and test.
63
+ Started from the `Network/data/data.mat`:
64
+
65
+ 0. Change the data path to the `data.mat` in `config.py`
66
+ 1. Run `1.tf_train.py`. It will create:
67
+ - `trainTF.pkl`, `testTF.pkl`: Piecewise turning function. Each element is a dict like `{'x':[x0,...,xn],'y':[y0,...,yn]}`
68
+ - `tf_train.npy`: Sampled turning function with shape (ntrain,1000)
69
+ - `D_test_train.npy`: Truning function distance matrix with shape (ntest,ntrain)
70
+ 2. Run `2.data_train_converted.py`. It will create:
71
+ - `data_train_converted.mat` & `data_train_converted.pkl`: The `.pkl` one Just a copy of the `.mat` re-dumped with pickle. The data have similar structure with `data.mat`.
72
+ - box:(x0,y0,x1,y1,room type)
73
+ ![data_train_converted.mat](../Interface/Img/data_train_converted.png)
74
+ 3. Run `3.rNum_train.py`. It wil create:
75
+ - `rNum_train.npy`: counts of different room type
76
+ 4. Run `4.data_train_eNum.py`. It will create:
77
+ - `data_train_eNum.pkl`: A dict like {'eNum':Array with shape (ntrain,25)}. Each array is reshape from (5,5) which means adjacency matrix of 5 coarse room types.
78
+ 5. Run `5.data_test_converted.py`. It will create:
79
+ - `data_train_converted.mat` & `data_train_converted.pkl`: The `.pkl` one Just a copy of the `.mat` re-dumped with pickle.
80
+ ![data_test_converted.mat](../Interface/Img/data_test_converted.png)
81
+
82
+ Data fileds:
83
+ - boundary: (x,y,dir,isNew)
84
+ - tf: Piece with turning function
85
+ - topK: 1000 indices of the training data has the minimun turning function with current data.
86
+ - topK_rNum: Counts for differnt room type of each topK room
87
+ 6. **[Depends on [faiss](https://github.com/facebookresearch/faiss)]** Run `6.cluster.py`. It will create:
88
+ - `centroids_train.npy`: 1000 discrete turning function cluster centroids (1000-d) of training data
89
+ - `clusters_train.npy`: 1000 nearest neighbors in training data of each centroid
DataPreparation/config.py ADDED
@@ -0,0 +1 @@
 
 
1
+ data_path = '../Network/data/data.mat'
DataPreparation/data/test.txt ADDED
@@ -0,0 +1,2880 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 80598
2
+ 59984
3
+ 33887
4
+ 34092
5
+ 79214
6
+ 57405
7
+ 15948
8
+ 80054
9
+ 45590
10
+ 38931
11
+ 3669
12
+ 37724
13
+ 65752
14
+ 60276
15
+ 2984
16
+ 80569
17
+ 76155
18
+ 48753
19
+ 24276
20
+ 7584
21
+ 28372
22
+ 73777
23
+ 57560
24
+ 17292
25
+ 9556
26
+ 38997
27
+ 33494
28
+ 22100
29
+ 79282
30
+ 39495
31
+ 80341
32
+ 55518
33
+ 47396
34
+ 41018
35
+ 62007
36
+ 34201
37
+ 35453
38
+ 55224
39
+ 75548
40
+ 78900
41
+ 78527
42
+ 56693
43
+ 34171
44
+ 68576
45
+ 71577
46
+ 49542
47
+ 49298
48
+ 12505
49
+ 22946
50
+ 6305
51
+ 51086
52
+ 49015
53
+ 30845
54
+ 5626
55
+ 50299
56
+ 41353
57
+ 64436
58
+ 24657
59
+ 33774
60
+ 40192
61
+ 52774
62
+ 58008
63
+ 60345
64
+ 32836
65
+ 21207
66
+ 60622
67
+ 25366
68
+ 68686
69
+ 63879
70
+ 66309
71
+ 27186
72
+ 14772
73
+ 39276
74
+ 38445
75
+ 63572
76
+ 54413
77
+ 41517
78
+ 47439
79
+ 49481
80
+ 67677
81
+ 16557
82
+ 3972
83
+ 79384
84
+ 15344
85
+ 71566
86
+ 30484
87
+ 22276
88
+ 18170
89
+ 12214
90
+ 30634
91
+ 1169
92
+ 26617
93
+ 57520
94
+ 13603
95
+ 75321
96
+ 62497
97
+ 61479
98
+ 20342
99
+ 12691
100
+ 80533
101
+ 35072
102
+ 16900
103
+ 52093
104
+ 4203
105
+ 48247
106
+ 46298
107
+ 26966
108
+ 48878
109
+ 41244
110
+ 11606
111
+ 7422
112
+ 34819
113
+ 48698
114
+ 32605
115
+ 54429
116
+ 30841
117
+ 17175
118
+ 57498
119
+ 71265
120
+ 77397
121
+ 66111
122
+ 57248
123
+ 74683
124
+ 67980
125
+ 24269
126
+ 75721
127
+ 6255
128
+ 6881
129
+ 26692
130
+ 830
131
+ 35975
132
+ 13073
133
+ 30930
134
+ 49242
135
+ 49504
136
+ 63284
137
+ 5561
138
+ 5909
139
+ 70301
140
+ 64523
141
+ 27325
142
+ 68392
143
+ 29598
144
+ 50565
145
+ 68276
146
+ 18426
147
+ 36358
148
+ 40864
149
+ 40299
150
+ 33935
151
+ 77847
152
+ 7544
153
+ 43055
154
+ 15604
155
+ 79141
156
+ 47835
157
+ 2285
158
+ 29808
159
+ 78202
160
+ 53409
161
+ 49549
162
+ 62338
163
+ 62567
164
+ 65617
165
+ 73079
166
+ 38544
167
+ 53300
168
+ 53474
169
+ 2337
170
+ 64310
171
+ 23235
172
+ 58666
173
+ 21690
174
+ 9406
175
+ 69293
176
+ 44389
177
+ 23712
178
+ 9168
179
+ 20520
180
+ 20352
181
+ 12926
182
+ 23824
183
+ 73793
184
+ 71245
185
+ 64342
186
+ 17839
187
+ 24717
188
+ 64830
189
+ 49892
190
+ 41414
191
+ 34852
192
+ 32725
193
+ 58188
194
+ 44522
195
+ 39018
196
+ 53937
197
+ 65620
198
+ 50588
199
+ 19259
200
+ 78801
201
+ 5267
202
+ 55251
203
+ 48891
204
+ 23839
205
+ 34280
206
+ 68738
207
+ 44892
208
+ 8355
209
+ 6251
210
+ 72376
211
+ 17560
212
+ 37714
213
+ 13909
214
+ 50557
215
+ 9246
216
+ 71545
217
+ 69274
218
+ 22858
219
+ 36625
220
+ 22941
221
+ 67482
222
+ 3760
223
+ 56803
224
+ 24250
225
+ 64949
226
+ 21840
227
+ 30745
228
+ 18820
229
+ 23490
230
+ 10218
231
+ 35561
232
+ 70554
233
+ 40239
234
+ 61987
235
+ 77036
236
+ 15162
237
+ 69028
238
+ 66232
239
+ 5998
240
+ 53577
241
+ 30367
242
+ 47454
243
+ 29119
244
+ 80124
245
+ 5582
246
+ 16648
247
+ 30445
248
+ 7906
249
+ 50127
250
+ 5660
251
+ 50223
252
+ 72333
253
+ 59028
254
+ 46164
255
+ 19457
256
+ 77489
257
+ 14598
258
+ 6433
259
+ 68370
260
+ 30789
261
+ 45897
262
+ 41351
263
+ 78535
264
+ 38055
265
+ 66021
266
+ 72715
267
+ 38562
268
+ 11963
269
+ 75839
270
+ 52223
271
+ 38810
272
+ 5358
273
+ 31218
274
+ 35302
275
+ 64189
276
+ 53439
277
+ 1115
278
+ 163
279
+ 61794
280
+ 37405
281
+ 11632
282
+ 6441
283
+ 65615
284
+ 19293
285
+ 55060
286
+ 33271
287
+ 33556
288
+ 45702
289
+ 11023
290
+ 66923
291
+ 33573
292
+ 70743
293
+ 65659
294
+ 8341
295
+ 49116
296
+ 51665
297
+ 20259
298
+ 59378
299
+ 50527
300
+ 5992
301
+ 30502
302
+ 69594
303
+ 33040
304
+ 49649
305
+ 75870
306
+ 57291
307
+ 32302
308
+ 4372
309
+ 41491
310
+ 77111
311
+ 60146
312
+ 49993
313
+ 66860
314
+ 6817
315
+ 14616
316
+ 38606
317
+ 14665
318
+ 11487
319
+ 61656
320
+ 29586
321
+ 59307
322
+ 45089
323
+ 67118
324
+ 59983
325
+ 9721
326
+ 33997
327
+ 11518
328
+ 32280
329
+ 59135
330
+ 63796
331
+ 3275
332
+ 37634
333
+ 45981
334
+ 79769
335
+ 36119
336
+ 76489
337
+ 59018
338
+ 37034
339
+ 20491
340
+ 72217
341
+ 69437
342
+ 10429
343
+ 28838
344
+ 52026
345
+ 27673
346
+ 61812
347
+ 35446
348
+ 58820
349
+ 62099
350
+ 45289
351
+ 57930
352
+ 9759
353
+ 45183
354
+ 78404
355
+ 878
356
+ 3856
357
+ 55999
358
+ 21825
359
+ 16182
360
+ 68493
361
+ 77191
362
+ 34223
363
+ 35392
364
+ 55620
365
+ 29855
366
+ 8512
367
+ 1346
368
+ 52068
369
+ 4134
370
+ 2739
371
+ 48916
372
+ 64775
373
+ 58394
374
+ 60278
375
+ 41202
376
+ 75471
377
+ 45720
378
+ 30572
379
+ 1494
380
+ 13919
381
+ 48989
382
+ 19207
383
+ 22306
384
+ 9417
385
+ 33423
386
+ 47560
387
+ 25144
388
+ 14479
389
+ 57024
390
+ 80162
391
+ 41525
392
+ 53246
393
+ 20954
394
+ 24279
395
+ 54286
396
+ 1502
397
+ 12985
398
+ 65391
399
+ 52886
400
+ 71262
401
+ 72534
402
+ 41808
403
+ 50148
404
+ 21602
405
+ 29016
406
+ 67047
407
+ 1034
408
+ 12256
409
+ 15687
410
+ 4497
411
+ 11450
412
+ 47155
413
+ 69200
414
+ 25673
415
+ 68055
416
+ 31828
417
+ 65934
418
+ 5193
419
+ 58654
420
+ 42289
421
+ 55359
422
+ 64182
423
+ 73451
424
+ 30416
425
+ 52349
426
+ 28525
427
+ 65400
428
+ 44292
429
+ 41921
430
+ 47755
431
+ 68816
432
+ 76014
433
+ 80733
434
+ 2612
435
+ 50896
436
+ 20589
437
+ 72793
438
+ 41927
439
+ 30463
440
+ 47569
441
+ 44076
442
+ 23135
443
+ 35861
444
+ 50332
445
+ 55691
446
+ 18364
447
+ 19063
448
+ 53781
449
+ 45225
450
+ 79878
451
+ 45020
452
+ 59208
453
+ 69337
454
+ 32962
455
+ 31743
456
+ 46751
457
+ 7764
458
+ 19664
459
+ 58182
460
+ 56044
461
+ 68770
462
+ 19711
463
+ 4053
464
+ 69209
465
+ 75125
466
+ 46258
467
+ 12654
468
+ 55570
469
+ 78223
470
+ 77751
471
+ 37660
472
+ 69983
473
+ 78155
474
+ 74020
475
+ 54515
476
+ 77551
477
+ 43578
478
+ 26826
479
+ 1425
480
+ 60406
481
+ 80256
482
+ 863
483
+ 13759
484
+ 28110
485
+ 52189
486
+ 55360
487
+ 43847
488
+ 65798
489
+ 13195
490
+ 14506
491
+ 33443
492
+ 18803
493
+ 70805
494
+ 10914
495
+ 23678
496
+ 48815
497
+ 77442
498
+ 47561
499
+ 35260
500
+ 31937
501
+ 24721
502
+ 59719
503
+ 72583
504
+ 9585
505
+ 68052
506
+ 24005
507
+ 31470
508
+ 27294
509
+ 23845
510
+ 738
511
+ 29272
512
+ 62482
513
+ 43433
514
+ 69714
515
+ 74483
516
+ 55871
517
+ 75053
518
+ 50282
519
+ 72951
520
+ 4422
521
+ 75029
522
+ 76419
523
+ 7467
524
+ 58524
525
+ 9019
526
+ 32868
527
+ 65883
528
+ 58730
529
+ 35459
530
+ 29843
531
+ 21077
532
+ 5438
533
+ 35984
534
+ 35905
535
+ 59783
536
+ 324
537
+ 29875
538
+ 13272
539
+ 2849
540
+ 55532
541
+ 25431
542
+ 61610
543
+ 71035
544
+ 62758
545
+ 36166
546
+ 57357
547
+ 75678
548
+ 45754
549
+ 44324
550
+ 11456
551
+ 67397
552
+ 29762
553
+ 6508
554
+ 2914
555
+ 46273
556
+ 8067
557
+ 61508
558
+ 65184
559
+ 58772
560
+ 39974
561
+ 47970
562
+ 50890
563
+ 48349
564
+ 65357
565
+ 30438
566
+ 65795
567
+ 1310
568
+ 29513
569
+ 6379
570
+ 18008
571
+ 53109
572
+ 67666
573
+ 42815
574
+ 11467
575
+ 31982
576
+ 75308
577
+ 48953
578
+ 39067
579
+ 26443
580
+ 33497
581
+ 1650
582
+ 29856
583
+ 39772
584
+ 66906
585
+ 65279
586
+ 59616
587
+ 63165
588
+ 25039
589
+ 71796
590
+ 11494
591
+ 19245
592
+ 72677
593
+ 64502
594
+ 32108
595
+ 24895
596
+ 48758
597
+ 5954
598
+ 66176
599
+ 5550
600
+ 23814
601
+ 75440
602
+ 784
603
+ 45211
604
+ 4809
605
+ 1638
606
+ 53375
607
+ 42762
608
+ 73928
609
+ 48896
610
+ 46987
611
+ 74264
612
+ 19751
613
+ 22164
614
+ 51157
615
+ 42736
616
+ 73388
617
+ 47288
618
+ 43873
619
+ 46106
620
+ 29860
621
+ 65459
622
+ 40576
623
+ 61246
624
+ 75348
625
+ 57271
626
+ 9034
627
+ 68182
628
+ 75993
629
+ 66741
630
+ 11375
631
+ 54912
632
+ 7321
633
+ 7094
634
+ 52840
635
+ 71588
636
+ 33375
637
+ 75043
638
+ 48443
639
+ 72086
640
+ 30694
641
+ 31552
642
+ 69725
643
+ 62106
644
+ 63614
645
+ 80276
646
+ 78653
647
+ 57539
648
+ 16380
649
+ 24696
650
+ 67190
651
+ 9807
652
+ 6690
653
+ 61265
654
+ 46309
655
+ 33315
656
+ 74008
657
+ 75396
658
+ 23084
659
+ 45458
660
+ 72553
661
+ 68690
662
+ 60394
663
+ 28109
664
+ 15003
665
+ 53856
666
+ 59173
667
+ 60595
668
+ 33896
669
+ 21694
670
+ 48206
671
+ 9217
672
+ 5041
673
+ 7332
674
+ 12508
675
+ 31204
676
+ 72388
677
+ 2797
678
+ 58172
679
+ 27745
680
+ 61383
681
+ 48978
682
+ 33960
683
+ 31699
684
+ 12656
685
+ 59762
686
+ 13138
687
+ 66203
688
+ 62221
689
+ 61122
690
+ 79726
691
+ 1224
692
+ 14061
693
+ 72169
694
+ 43111
695
+ 76308
696
+ 64863
697
+ 44103
698
+ 57358
699
+ 44787
700
+ 38411
701
+ 27488
702
+ 1243
703
+ 5213
704
+ 29206
705
+ 36236
706
+ 45123
707
+ 71731
708
+ 55887
709
+ 44635
710
+ 3892
711
+ 64929
712
+ 69057
713
+ 46874
714
+ 46466
715
+ 15812
716
+ 74242
717
+ 78386
718
+ 29387
719
+ 56156
720
+ 62630
721
+ 23618
722
+ 27569
723
+ 50625
724
+ 42690
725
+ 60906
726
+ 40196
727
+ 29583
728
+ 15853
729
+ 15689
730
+ 50511
731
+ 9424
732
+ 2381
733
+ 40291
734
+ 62179
735
+ 59889
736
+ 37962
737
+ 27357
738
+ 23920
739
+ 16251
740
+ 77426
741
+ 56950
742
+ 8336
743
+ 57249
744
+ 7832
745
+ 38617
746
+ 48715
747
+ 29967
748
+ 70902
749
+ 71529
750
+ 48289
751
+ 79422
752
+ 65756
753
+ 4784
754
+ 32057
755
+ 44337
756
+ 38161
757
+ 6512
758
+ 64166
759
+ 55057
760
+ 43735
761
+ 10547
762
+ 7833
763
+ 78344
764
+ 12467
765
+ 15534
766
+ 19023
767
+ 55437
768
+ 76749
769
+ 4214
770
+ 74597
771
+ 1693
772
+ 33097
773
+ 19431
774
+ 39422
775
+ 74965
776
+ 61696
777
+ 18635
778
+ 71223
779
+ 55964
780
+ 59112
781
+ 4743
782
+ 27983
783
+ 7727
784
+ 56481
785
+ 49024
786
+ 21612
787
+ 61379
788
+ 20069
789
+ 41614
790
+ 32258
791
+ 75191
792
+ 15606
793
+ 6210
794
+ 72514
795
+ 62763
796
+ 46345
797
+ 12108
798
+ 35204
799
+ 38210
800
+ 4108
801
+ 60901
802
+ 30289
803
+ 70661
804
+ 79968
805
+ 51290
806
+ 69412
807
+ 44363
808
+ 13438
809
+ 65496
810
+ 59423
811
+ 41503
812
+ 47158
813
+ 3242
814
+ 52684
815
+ 67504
816
+ 67277
817
+ 3573
818
+ 54121
819
+ 35282
820
+ 51547
821
+ 65745
822
+ 59918
823
+ 76927
824
+ 26392
825
+ 60246
826
+ 24824
827
+ 64163
828
+ 49114
829
+ 79793
830
+ 70098
831
+ 29724
832
+ 71244
833
+ 29531
834
+ 61464
835
+ 53860
836
+ 64402
837
+ 39481
838
+ 74135
839
+ 4324
840
+ 12340
841
+ 6064
842
+ 9634
843
+ 40168
844
+ 49436
845
+ 19776
846
+ 61612
847
+ 71030
848
+ 60841
849
+ 48589
850
+ 16502
851
+ 60555
852
+ 72662
853
+ 57297
854
+ 12430
855
+ 74871
856
+ 22837
857
+ 12708
858
+ 1107
859
+ 68836
860
+ 850
861
+ 5989
862
+ 71058
863
+ 7954
864
+ 62118
865
+ 41682
866
+ 59652
867
+ 33138
868
+ 67656
869
+ 54009
870
+ 31037
871
+ 18486
872
+ 4778
873
+ 64817
874
+ 30705
875
+ 73564
876
+ 21282
877
+ 21109
878
+ 22543
879
+ 3419
880
+ 16521
881
+ 27380
882
+ 40586
883
+ 9501
884
+ 26172
885
+ 28360
886
+ 77674
887
+ 68270
888
+ 37002
889
+ 19914
890
+ 38954
891
+ 74210
892
+ 1212
893
+ 74508
894
+ 10056
895
+ 16622
896
+ 42193
897
+ 24936
898
+ 59102
899
+ 30020
900
+ 36495
901
+ 32713
902
+ 76175
903
+ 24589
904
+ 52705
905
+ 60987
906
+ 14291
907
+ 66618
908
+ 76009
909
+ 25971
910
+ 79773
911
+ 18566
912
+ 78144
913
+ 78351
914
+ 57781
915
+ 53983
916
+ 49080
917
+ 10161
918
+ 15587
919
+ 43457
920
+ 62344
921
+ 62867
922
+ 56561
923
+ 70993
924
+ 56873
925
+ 34953
926
+ 61723
927
+ 79049
928
+ 10232
929
+ 3989
930
+ 4448
931
+ 33365
932
+ 22952
933
+ 1208
934
+ 27400
935
+ 41548
936
+ 10169
937
+ 9603
938
+ 20941
939
+ 31033
940
+ 26705
941
+ 48739
942
+ 75787
943
+ 30073
944
+ 42942
945
+ 73120
946
+ 50075
947
+ 75713
948
+ 22465
949
+ 28234
950
+ 9153
951
+ 78810
952
+ 7552
953
+ 28793
954
+ 38113
955
+ 5094
956
+ 46292
957
+ 23181
958
+ 9010
959
+ 9706
960
+ 47298
961
+ 75343
962
+ 77416
963
+ 63068
964
+ 33225
965
+ 38682
966
+ 24408
967
+ 54974
968
+ 15292
969
+ 44170
970
+ 26770
971
+ 33190
972
+ 45207
973
+ 32708
974
+ 24341
975
+ 61932
976
+ 527
977
+ 48802
978
+ 48546
979
+ 76517
980
+ 77129
981
+ 67314
982
+ 56310
983
+ 6521
984
+ 51449
985
+ 66787
986
+ 14210
987
+ 315
988
+ 70820
989
+ 13383
990
+ 53566
991
+ 67370
992
+ 45413
993
+ 68172
994
+ 50303
995
+ 43362
996
+ 45147
997
+ 59699
998
+ 23331
999
+ 38713
1000
+ 78611
1001
+ 56576
1002
+ 42342
1003
+ 3051
1004
+ 60867
1005
+ 46805
1006
+ 3790
1007
+ 75614
1008
+ 9592
1009
+ 31809
1010
+ 76432
1011
+ 69968
1012
+ 40881
1013
+ 26923
1014
+ 47225
1015
+ 70091
1016
+ 33372
1017
+ 37465
1018
+ 56848
1019
+ 71469
1020
+ 67890
1021
+ 267
1022
+ 5369
1023
+ 21462
1024
+ 63336
1025
+ 49043
1026
+ 38199
1027
+ 15956
1028
+ 74507
1029
+ 45576
1030
+ 78778
1031
+ 3810
1032
+ 13300
1033
+ 31046
1034
+ 3822
1035
+ 60070
1036
+ 65442
1037
+ 57028
1038
+ 23671
1039
+ 11906
1040
+ 48439
1041
+ 26874
1042
+ 38195
1043
+ 56134
1044
+ 64849
1045
+ 77289
1046
+ 70607
1047
+ 112
1048
+ 33765
1049
+ 65926
1050
+ 15305
1051
+ 14647
1052
+ 27398
1053
+ 61333
1054
+ 67983
1055
+ 63422
1056
+ 9601
1057
+ 68618
1058
+ 62852
1059
+ 58382
1060
+ 59093
1061
+ 60125
1062
+ 22270
1063
+ 25615
1064
+ 40806
1065
+ 59799
1066
+ 37554
1067
+ 34554
1068
+ 1311
1069
+ 20290
1070
+ 42058
1071
+ 70682
1072
+ 19724
1073
+ 63248
1074
+ 73356
1075
+ 60831
1076
+ 53231
1077
+ 32186
1078
+ 6712
1079
+ 25485
1080
+ 80445
1081
+ 14599
1082
+ 10370
1083
+ 23226
1084
+ 3622
1085
+ 77862
1086
+ 40324
1087
+ 48035
1088
+ 1458
1089
+ 29934
1090
+ 29510
1091
+ 77540
1092
+ 62514
1093
+ 73718
1094
+ 10489
1095
+ 77898
1096
+ 5754
1097
+ 32570
1098
+ 60895
1099
+ 77245
1100
+ 12570
1101
+ 49724
1102
+ 44254
1103
+ 11894
1104
+ 77758
1105
+ 66093
1106
+ 2022
1107
+ 8616
1108
+ 7284
1109
+ 19665
1110
+ 33951
1111
+ 52690
1112
+ 8066
1113
+ 7087
1114
+ 7536
1115
+ 2436
1116
+ 40198
1117
+ 68750
1118
+ 1021
1119
+ 29142
1120
+ 36656
1121
+ 14129
1122
+ 69159
1123
+ 36161
1124
+ 20114
1125
+ 68694
1126
+ 11092
1127
+ 11398
1128
+ 25305
1129
+ 65576
1130
+ 38663
1131
+ 22070
1132
+ 59473
1133
+ 51257
1134
+ 64113
1135
+ 60213
1136
+ 26280
1137
+ 26622
1138
+ 74677
1139
+ 63958
1140
+ 60123
1141
+ 78701
1142
+ 10868
1143
+ 21360
1144
+ 23929
1145
+ 29607
1146
+ 11432
1147
+ 9143
1148
+ 76214
1149
+ 56276
1150
+ 53370
1151
+ 23910
1152
+ 29010
1153
+ 62461
1154
+ 60848
1155
+ 46907
1156
+ 25497
1157
+ 61934
1158
+ 35601
1159
+ 38423
1160
+ 27189
1161
+ 61797
1162
+ 32190
1163
+ 48332
1164
+ 18848
1165
+ 76211
1166
+ 41438
1167
+ 71247
1168
+ 40120
1169
+ 78470
1170
+ 36859
1171
+ 39523
1172
+ 18079
1173
+ 720
1174
+ 32710
1175
+ 53322
1176
+ 44380
1177
+ 2834
1178
+ 55215
1179
+ 72529
1180
+ 39235
1181
+ 50157
1182
+ 74745
1183
+ 6083
1184
+ 45974
1185
+ 60407
1186
+ 34346
1187
+ 75449
1188
+ 5715
1189
+ 5295
1190
+ 49487
1191
+ 52205
1192
+ 78690
1193
+ 61585
1194
+ 77574
1195
+ 27890
1196
+ 41282
1197
+ 20966
1198
+ 61808
1199
+ 44628
1200
+ 60823
1201
+ 13424
1202
+ 66474
1203
+ 58152
1204
+ 32069
1205
+ 44651
1206
+ 74004
1207
+ 24888
1208
+ 17960
1209
+ 49880
1210
+ 19492
1211
+ 56722
1212
+ 27437
1213
+ 20595
1214
+ 15826
1215
+ 58811
1216
+ 35059
1217
+ 71710
1218
+ 54563
1219
+ 7508
1220
+ 68920
1221
+ 39890
1222
+ 4016
1223
+ 26062
1224
+ 50575
1225
+ 67899
1226
+ 31508
1227
+ 64008
1228
+ 28436
1229
+ 33958
1230
+ 73990
1231
+ 25518
1232
+ 41661
1233
+ 59613
1234
+ 21088
1235
+ 44398
1236
+ 27174
1237
+ 13458
1238
+ 12022
1239
+ 55226
1240
+ 70574
1241
+ 71154
1242
+ 7620
1243
+ 77177
1244
+ 80448
1245
+ 62623
1246
+ 66184
1247
+ 40253
1248
+ 65133
1249
+ 66844
1250
+ 30981
1251
+ 30604
1252
+ 73725
1253
+ 14117
1254
+ 35900
1255
+ 69726
1256
+ 37059
1257
+ 32035
1258
+ 37810
1259
+ 9472
1260
+ 62609
1261
+ 57220
1262
+ 51155
1263
+ 49692
1264
+ 11488
1265
+ 63157
1266
+ 43002
1267
+ 6758
1268
+ 19544
1269
+ 25967
1270
+ 28452
1271
+ 52188
1272
+ 18481
1273
+ 27738
1274
+ 19382
1275
+ 63751
1276
+ 38999
1277
+ 73411
1278
+ 73638
1279
+ 74765
1280
+ 26133
1281
+ 27699
1282
+ 56717
1283
+ 62490
1284
+ 30343
1285
+ 13718
1286
+ 30741
1287
+ 55286
1288
+ 594
1289
+ 68718
1290
+ 46302
1291
+ 57656
1292
+ 23612
1293
+ 1149
1294
+ 59908
1295
+ 1923
1296
+ 24355
1297
+ 13515
1298
+ 12729
1299
+ 62861
1300
+ 18694
1301
+ 51409
1302
+ 37031
1303
+ 19504
1304
+ 26580
1305
+ 28736
1306
+ 53170
1307
+ 48339
1308
+ 68788
1309
+ 28489
1310
+ 37047
1311
+ 63590
1312
+ 16509
1313
+ 77013
1314
+ 9384
1315
+ 12628
1316
+ 44655
1317
+ 11262
1318
+ 60499
1319
+ 75075
1320
+ 27105
1321
+ 53057
1322
+ 52870
1323
+ 22121
1324
+ 80589
1325
+ 65678
1326
+ 44216
1327
+ 42936
1328
+ 54616
1329
+ 57578
1330
+ 9311
1331
+ 53142
1332
+ 67518
1333
+ 26398
1334
+ 26440
1335
+ 31155
1336
+ 15896
1337
+ 79153
1338
+ 29709
1339
+ 65117
1340
+ 66669
1341
+ 69634
1342
+ 43460
1343
+ 20694
1344
+ 34046
1345
+ 63457
1346
+ 17016
1347
+ 7096
1348
+ 77383
1349
+ 39903
1350
+ 53855
1351
+ 56861
1352
+ 53331
1353
+ 41590
1354
+ 34752
1355
+ 8937
1356
+ 70011
1357
+ 24498
1358
+ 43936
1359
+ 25788
1360
+ 46649
1361
+ 58415
1362
+ 37247
1363
+ 47380
1364
+ 14186
1365
+ 69972
1366
+ 16768
1367
+ 40171
1368
+ 52732
1369
+ 72560
1370
+ 8469
1371
+ 42676
1372
+ 123
1373
+ 57128
1374
+ 62878
1375
+ 55748
1376
+ 28246
1377
+ 78076
1378
+ 16877
1379
+ 63883
1380
+ 45833
1381
+ 26264
1382
+ 6327
1383
+ 51619
1384
+ 17005
1385
+ 24502
1386
+ 19648
1387
+ 38996
1388
+ 78078
1389
+ 26134
1390
+ 20508
1391
+ 75249
1392
+ 79396
1393
+ 49003
1394
+ 6860
1395
+ 77208
1396
+ 72522
1397
+ 20244
1398
+ 49896
1399
+ 1350
1400
+ 74493
1401
+ 49756
1402
+ 25223
1403
+ 13434
1404
+ 76732
1405
+ 22731
1406
+ 67205
1407
+ 66541
1408
+ 66086
1409
+ 12373
1410
+ 32512
1411
+ 40912
1412
+ 76337
1413
+ 77479
1414
+ 12878
1415
+ 42902
1416
+ 51009
1417
+ 69465
1418
+ 71025
1419
+ 12841
1420
+ 71418
1421
+ 17906
1422
+ 47623
1423
+ 38254
1424
+ 8072
1425
+ 14539
1426
+ 73627
1427
+ 44602
1428
+ 69210
1429
+ 63335
1430
+ 61342
1431
+ 48658
1432
+ 62991
1433
+ 58349
1434
+ 55487
1435
+ 19356
1436
+ 9409
1437
+ 7180
1438
+ 51355
1439
+ 70919
1440
+ 49738
1441
+ 21202
1442
+ 20437
1443
+ 33586
1444
+ 13055
1445
+ 29708
1446
+ 49008
1447
+ 62380
1448
+ 42036
1449
+ 68733
1450
+ 4636
1451
+ 35318
1452
+ 24337
1453
+ 70050
1454
+ 37507
1455
+ 42118
1456
+ 18969
1457
+ 66796
1458
+ 27044
1459
+ 60405
1460
+ 65061
1461
+ 73098
1462
+ 69898
1463
+ 67302
1464
+ 3262
1465
+ 21498
1466
+ 80367
1467
+ 29505
1468
+ 21093
1469
+ 11952
1470
+ 34246
1471
+ 12401
1472
+ 39347
1473
+ 8811
1474
+ 42412
1475
+ 25693
1476
+ 49657
1477
+ 68289
1478
+ 66208
1479
+ 44876
1480
+ 20340
1481
+ 6757
1482
+ 36288
1483
+ 13821
1484
+ 48355
1485
+ 8229
1486
+ 7443
1487
+ 54914
1488
+ 54111
1489
+ 59315
1490
+ 17240
1491
+ 69939
1492
+ 51915
1493
+ 8885
1494
+ 27334
1495
+ 76617
1496
+ 10791
1497
+ 64879
1498
+ 32524
1499
+ 53243
1500
+ 43926
1501
+ 29546
1502
+ 50657
1503
+ 50230
1504
+ 16014
1505
+ 63354
1506
+ 59254
1507
+ 63577
1508
+ 49111
1509
+ 75808
1510
+ 14267
1511
+ 27063
1512
+ 28802
1513
+ 32501
1514
+ 33943
1515
+ 68273
1516
+ 20201
1517
+ 36960
1518
+ 71945
1519
+ 70452
1520
+ 33447
1521
+ 55085
1522
+ 51752
1523
+ 80461
1524
+ 55593
1525
+ 42293
1526
+ 30935
1527
+ 25728
1528
+ 16131
1529
+ 15360
1530
+ 66024
1531
+ 80597
1532
+ 38066
1533
+ 42827
1534
+ 46993
1535
+ 45910
1536
+ 25242
1537
+ 36533
1538
+ 62138
1539
+ 37954
1540
+ 72318
1541
+ 76262
1542
+ 23577
1543
+ 78186
1544
+ 27054
1545
+ 18713
1546
+ 67279
1547
+ 31403
1548
+ 6605
1549
+ 19085
1550
+ 444
1551
+ 15012
1552
+ 26662
1553
+ 9857
1554
+ 10423
1555
+ 40620
1556
+ 29070
1557
+ 38341
1558
+ 40077
1559
+ 73241
1560
+ 54714
1561
+ 2859
1562
+ 73082
1563
+ 56695
1564
+ 51612
1565
+ 26787
1566
+ 44639
1567
+ 8252
1568
+ 73741
1569
+ 9535
1570
+ 41087
1571
+ 17050
1572
+ 67577
1573
+ 56367
1574
+ 40081
1575
+ 10531
1576
+ 38594
1577
+ 8936
1578
+ 36144
1579
+ 21833
1580
+ 58285
1581
+ 68034
1582
+ 78682
1583
+ 53904
1584
+ 29928
1585
+ 40980
1586
+ 41405
1587
+ 27671
1588
+ 67948
1589
+ 74029
1590
+ 20374
1591
+ 26888
1592
+ 56691
1593
+ 47880
1594
+ 66995
1595
+ 48861
1596
+ 3566
1597
+ 43007
1598
+ 58335
1599
+ 2057
1600
+ 78892
1601
+ 29680
1602
+ 54081
1603
+ 13172
1604
+ 41546
1605
+ 32230
1606
+ 32148
1607
+ 23418
1608
+ 79416
1609
+ 30929
1610
+ 24716
1611
+ 65440
1612
+ 67120
1613
+ 46605
1614
+ 35998
1615
+ 23508
1616
+ 47913
1617
+ 31124
1618
+ 8314
1619
+ 55492
1620
+ 18249
1621
+ 4572
1622
+ 39439
1623
+ 76017
1624
+ 41216
1625
+ 3151
1626
+ 38757
1627
+ 63420
1628
+ 10583
1629
+ 40893
1630
+ 18238
1631
+ 14795
1632
+ 28151
1633
+ 80179
1634
+ 7301
1635
+ 41584
1636
+ 5951
1637
+ 59923
1638
+ 23686
1639
+ 9243
1640
+ 73016
1641
+ 33390
1642
+ 70118
1643
+ 15227
1644
+ 76552
1645
+ 19403
1646
+ 38036
1647
+ 63235
1648
+ 47888
1649
+ 53946
1650
+ 65830
1651
+ 35646
1652
+ 72460
1653
+ 47800
1654
+ 63605
1655
+ 32805
1656
+ 2133
1657
+ 77380
1658
+ 22702
1659
+ 71902
1660
+ 36725
1661
+ 11814
1662
+ 80245
1663
+ 50155
1664
+ 39825
1665
+ 6099
1666
+ 69704
1667
+ 77685
1668
+ 6148
1669
+ 72588
1670
+ 42139
1671
+ 69653
1672
+ 38630
1673
+ 25508
1674
+ 59262
1675
+ 50271
1676
+ 36751
1677
+ 67139
1678
+ 27963
1679
+ 56724
1680
+ 65208
1681
+ 45213
1682
+ 20839
1683
+ 19989
1684
+ 74226
1685
+ 34286
1686
+ 27992
1687
+ 67921
1688
+ 26720
1689
+ 57670
1690
+ 56106
1691
+ 31692
1692
+ 16101
1693
+ 62459
1694
+ 78841
1695
+ 22235
1696
+ 27674
1697
+ 62708
1698
+ 76622
1699
+ 343
1700
+ 1744
1701
+ 30400
1702
+ 11038
1703
+ 21605
1704
+ 59210
1705
+ 35438
1706
+ 26789
1707
+ 41507
1708
+ 67353
1709
+ 28022
1710
+ 54470
1711
+ 75778
1712
+ 47416
1713
+ 5864
1714
+ 77876
1715
+ 32663
1716
+ 54442
1717
+ 69149
1718
+ 67064
1719
+ 8164
1720
+ 64199
1721
+ 2788
1722
+ 53836
1723
+ 53207
1724
+ 65526
1725
+ 11753
1726
+ 49517
1727
+ 14352
1728
+ 25522
1729
+ 61544
1730
+ 3348
1731
+ 75113
1732
+ 26765
1733
+ 63374
1734
+ 57359
1735
+ 11884
1736
+ 41555
1737
+ 15394
1738
+ 56136
1739
+ 64070
1740
+ 6604
1741
+ 79680
1742
+ 75687
1743
+ 6781
1744
+ 51680
1745
+ 42138
1746
+ 2766
1747
+ 14809
1748
+ 77302
1749
+ 35119
1750
+ 71084
1751
+ 65369
1752
+ 3949
1753
+ 72607
1754
+ 69559
1755
+ 6097
1756
+ 70006
1757
+ 989
1758
+ 8334
1759
+ 26195
1760
+ 55193
1761
+ 77351
1762
+ 50947
1763
+ 2108
1764
+ 48939
1765
+ 73162
1766
+ 78465
1767
+ 31551
1768
+ 54231
1769
+ 71947
1770
+ 27482
1771
+ 64097
1772
+ 6166
1773
+ 23571
1774
+ 371
1775
+ 17090
1776
+ 34227
1777
+ 36710
1778
+ 26901
1779
+ 45599
1780
+ 61066
1781
+ 38502
1782
+ 2768
1783
+ 54160
1784
+ 79838
1785
+ 74811
1786
+ 34418
1787
+ 8052
1788
+ 61521
1789
+ 45431
1790
+ 58023
1791
+ 1945
1792
+ 75401
1793
+ 7113
1794
+ 52153
1795
+ 29063
1796
+ 6037
1797
+ 7453
1798
+ 45994
1799
+ 78562
1800
+ 63939
1801
+ 65551
1802
+ 47600
1803
+ 14193
1804
+ 42847
1805
+ 57605
1806
+ 16397
1807
+ 40022
1808
+ 36259
1809
+ 33769
1810
+ 41877
1811
+ 27343
1812
+ 57850
1813
+ 9419
1814
+ 28362
1815
+ 31296
1816
+ 65581
1817
+ 17008
1818
+ 4289
1819
+ 77681
1820
+ 57210
1821
+ 23511
1822
+ 3469
1823
+ 71708
1824
+ 4831
1825
+ 22521
1826
+ 67568
1827
+ 30121
1828
+ 55605
1829
+ 23046
1830
+ 24015
1831
+ 7720
1832
+ 2031
1833
+ 79078
1834
+ 22305
1835
+ 65040
1836
+ 17635
1837
+ 35585
1838
+ 21961
1839
+ 33553
1840
+ 40962
1841
+ 34558
1842
+ 67519
1843
+ 42816
1844
+ 41524
1845
+ 26429
1846
+ 13140
1847
+ 5414
1848
+ 3839
1849
+ 45968
1850
+ 4563
1851
+ 50509
1852
+ 9407
1853
+ 80532
1854
+ 54994
1855
+ 16960
1856
+ 4442
1857
+ 70395
1858
+ 38649
1859
+ 78009
1860
+ 20512
1861
+ 51084
1862
+ 75519
1863
+ 28668
1864
+ 76135
1865
+ 27934
1866
+ 10306
1867
+ 19902
1868
+ 52796
1869
+ 46488
1870
+ 72887
1871
+ 53177
1872
+ 70157
1873
+ 38813
1874
+ 23771
1875
+ 15097
1876
+ 44538
1877
+ 44803
1878
+ 76054
1879
+ 60776
1880
+ 43138
1881
+ 58635
1882
+ 64727
1883
+ 76327
1884
+ 37824
1885
+ 78142
1886
+ 17639
1887
+ 48114
1888
+ 47751
1889
+ 21261
1890
+ 21053
1891
+ 20099
1892
+ 74392
1893
+ 14396
1894
+ 9179
1895
+ 65461
1896
+ 12184
1897
+ 13622
1898
+ 10198
1899
+ 56537
1900
+ 63461
1901
+ 10586
1902
+ 36440
1903
+ 76527
1904
+ 54774
1905
+ 15500
1906
+ 8196
1907
+ 32481
1908
+ 13580
1909
+ 17959
1910
+ 59720
1911
+ 26589
1912
+ 29522
1913
+ 71848
1914
+ 73535
1915
+ 70785
1916
+ 13237
1917
+ 48924
1918
+ 18363
1919
+ 12140
1920
+ 10981
1921
+ 17027
1922
+ 54874
1923
+ 13081
1924
+ 59510
1925
+ 18046
1926
+ 46071
1927
+ 51704
1928
+ 32008
1929
+ 52236
1930
+ 54969
1931
+ 13687
1932
+ 37588
1933
+ 64903
1934
+ 79487
1935
+ 29559
1936
+ 3203
1937
+ 61191
1938
+ 31402
1939
+ 30397
1940
+ 19121
1941
+ 48501
1942
+ 68721
1943
+ 6078
1944
+ 32076
1945
+ 6720
1946
+ 17003
1947
+ 80355
1948
+ 59436
1949
+ 46491
1950
+ 50367
1951
+ 38076
1952
+ 39542
1953
+ 11289
1954
+ 47264
1955
+ 60450
1956
+ 25986
1957
+ 30955
1958
+ 28553
1959
+ 33757
1960
+ 45922
1961
+ 34188
1962
+ 30138
1963
+ 43805
1964
+ 29557
1965
+ 59987
1966
+ 20619
1967
+ 65163
1968
+ 52207
1969
+ 828
1970
+ 48256
1971
+ 16140
1972
+ 24444
1973
+ 34832
1974
+ 38402
1975
+ 5191
1976
+ 70967
1977
+ 19705
1978
+ 38085
1979
+ 13344
1980
+ 12574
1981
+ 17402
1982
+ 77462
1983
+ 21052
1984
+ 69169
1985
+ 11690
1986
+ 31132
1987
+ 4058
1988
+ 14326
1989
+ 53514
1990
+ 10703
1991
+ 34006
1992
+ 63496
1993
+ 4789
1994
+ 60519
1995
+ 915
1996
+ 27114
1997
+ 11272
1998
+ 28606
1999
+ 71541
2000
+ 12023
2001
+ 31578
2002
+ 13463
2003
+ 34131
2004
+ 33155
2005
+ 27025
2006
+ 73747
2007
+ 75844
2008
+ 52811
2009
+ 47360
2010
+ 79882
2011
+ 74657
2012
+ 43875
2013
+ 76550
2014
+ 68069
2015
+ 10251
2016
+ 62003
2017
+ 49737
2018
+ 6428
2019
+ 32820
2020
+ 79038
2021
+ 9645
2022
+ 30193
2023
+ 44117
2024
+ 66384
2025
+ 51075
2026
+ 19696
2027
+ 37308
2028
+ 42262
2029
+ 73592
2030
+ 39037
2031
+ 54368
2032
+ 52467
2033
+ 57814
2034
+ 25962
2035
+ 77567
2036
+ 46808
2037
+ 19838
2038
+ 35186
2039
+ 50655
2040
+ 40133
2041
+ 45990
2042
+ 79259
2043
+ 33460
2044
+ 18557
2045
+ 37365
2046
+ 61787
2047
+ 66715
2048
+ 9471
2049
+ 27156
2050
+ 15535
2051
+ 53350
2052
+ 34401
2053
+ 69806
2054
+ 6473
2055
+ 27121
2056
+ 23834
2057
+ 24687
2058
+ 19817
2059
+ 22333
2060
+ 73139
2061
+ 11766
2062
+ 10408
2063
+ 59220
2064
+ 4507
2065
+ 31288
2066
+ 31778
2067
+ 20377
2068
+ 39050
2069
+ 18521
2070
+ 9636
2071
+ 69211
2072
+ 71416
2073
+ 22485
2074
+ 37470
2075
+ 44917
2076
+ 62740
2077
+ 62074
2078
+ 25840
2079
+ 62117
2080
+ 26096
2081
+ 3096
2082
+ 75311
2083
+ 6630
2084
+ 25597
2085
+ 35231
2086
+ 28336
2087
+ 48182
2088
+ 28857
2089
+ 76902
2090
+ 51337
2091
+ 44746
2092
+ 23640
2093
+ 31762
2094
+ 46104
2095
+ 66975
2096
+ 4275
2097
+ 58847
2098
+ 71022
2099
+ 59939
2100
+ 46634
2101
+ 50874
2102
+ 41959
2103
+ 21399
2104
+ 64009
2105
+ 26767
2106
+ 48323
2107
+ 19223
2108
+ 76075
2109
+ 20832
2110
+ 17825
2111
+ 62681
2112
+ 25889
2113
+ 71838
2114
+ 26569
2115
+ 36984
2116
+ 29338
2117
+ 18824
2118
+ 73015
2119
+ 56697
2120
+ 5059
2121
+ 16308
2122
+ 63845
2123
+ 43672
2124
+ 64084
2125
+ 70763
2126
+ 26122
2127
+ 14629
2128
+ 66142
2129
+ 29043
2130
+ 29453
2131
+ 45728
2132
+ 36470
2133
+ 50844
2134
+ 38426
2135
+ 5004
2136
+ 49214
2137
+ 2990
2138
+ 1608
2139
+ 52860
2140
+ 44234
2141
+ 68386
2142
+ 13145
2143
+ 60938
2144
+ 79089
2145
+ 38413
2146
+ 9493
2147
+ 77780
2148
+ 18859
2149
+ 3522
2150
+ 35451
2151
+ 62127
2152
+ 27709
2153
+ 10440
2154
+ 70730
2155
+ 80449
2156
+ 79387
2157
+ 5514
2158
+ 24473
2159
+ 30451
2160
+ 76855
2161
+ 730
2162
+ 52102
2163
+ 48199
2164
+ 18695
2165
+ 49561
2166
+ 9043
2167
+ 18400
2168
+ 62827
2169
+ 50292
2170
+ 62136
2171
+ 37387
2172
+ 15731
2173
+ 820
2174
+ 34243
2175
+ 42480
2176
+ 56701
2177
+ 78028
2178
+ 21501
2179
+ 32476
2180
+ 22961
2181
+ 23523
2182
+ 38287
2183
+ 62910
2184
+ 15770
2185
+ 25742
2186
+ 59386
2187
+ 48562
2188
+ 74441
2189
+ 77033
2190
+ 37025
2191
+ 53041
2192
+ 75618
2193
+ 28608
2194
+ 41543
2195
+ 44818
2196
+ 70498
2197
+ 54741
2198
+ 31341
2199
+ 16800
2200
+ 27695
2201
+ 59581
2202
+ 48296
2203
+ 18348
2204
+ 11271
2205
+ 31763
2206
+ 10417
2207
+ 67092
2208
+ 47547
2209
+ 3752
2210
+ 7368
2211
+ 3751
2212
+ 64648
2213
+ 56052
2214
+ 10473
2215
+ 24804
2216
+ 31020
2217
+ 79918
2218
+ 5458
2219
+ 31084
2220
+ 4757
2221
+ 62298
2222
+ 36997
2223
+ 1282
2224
+ 58739
2225
+ 36689
2226
+ 46044
2227
+ 69099
2228
+ 57984
2229
+ 26927
2230
+ 7221
2231
+ 2596
2232
+ 9569
2233
+ 10435
2234
+ 72368
2235
+ 27626
2236
+ 66551
2237
+ 24511
2238
+ 74539
2239
+ 54130
2240
+ 47935
2241
+ 30554
2242
+ 16378
2243
+ 74101
2244
+ 51983
2245
+ 62779
2246
+ 44931
2247
+ 20581
2248
+ 20110
2249
+ 58227
2250
+ 74113
2251
+ 76269
2252
+ 30944
2253
+ 16389
2254
+ 18028
2255
+ 69246
2256
+ 42962
2257
+ 37727
2258
+ 26231
2259
+ 18738
2260
+ 38702
2261
+ 71841
2262
+ 6498
2263
+ 59610
2264
+ 34325
2265
+ 34316
2266
+ 25148
2267
+ 50522
2268
+ 32063
2269
+ 64387
2270
+ 40162
2271
+ 45193
2272
+ 33237
2273
+ 31411
2274
+ 18791
2275
+ 7621
2276
+ 543
2277
+ 59314
2278
+ 28866
2279
+ 73751
2280
+ 32526
2281
+ 75802
2282
+ 34438
2283
+ 77509
2284
+ 64469
2285
+ 12059
2286
+ 75770
2287
+ 73952
2288
+ 80268
2289
+ 4104
2290
+ 28516
2291
+ 22829
2292
+ 12834
2293
+ 70679
2294
+ 482
2295
+ 80703
2296
+ 79527
2297
+ 14623
2298
+ 12790
2299
+ 12712
2300
+ 49391
2301
+ 60696
2302
+ 274
2303
+ 23521
2304
+ 4906
2305
+ 2462
2306
+ 52002
2307
+ 59476
2308
+ 77362
2309
+ 24413
2310
+ 29604
2311
+ 60288
2312
+ 77427
2313
+ 42782
2314
+ 27877
2315
+ 40557
2316
+ 21221
2317
+ 22427
2318
+ 36941
2319
+ 32738
2320
+ 35359
2321
+ 61552
2322
+ 6214
2323
+ 9941
2324
+ 70443
2325
+ 8160
2326
+ 28302
2327
+ 55709
2328
+ 66854
2329
+ 68563
2330
+ 71988
2331
+ 60514
2332
+ 9782
2333
+ 44481
2334
+ 16195
2335
+ 51651
2336
+ 54559
2337
+ 72733
2338
+ 7996
2339
+ 60711
2340
+ 10657
2341
+ 21535
2342
+ 38944
2343
+ 563
2344
+ 57553
2345
+ 54227
2346
+ 40478
2347
+ 59576
2348
+ 52672
2349
+ 60505
2350
+ 30449
2351
+ 49829
2352
+ 52170
2353
+ 31636
2354
+ 62083
2355
+ 41125
2356
+ 75369
2357
+ 6585
2358
+ 75219
2359
+ 72689
2360
+ 45972
2361
+ 50023
2362
+ 78278
2363
+ 73608
2364
+ 24357
2365
+ 57650
2366
+ 71087
2367
+ 56439
2368
+ 13058
2369
+ 50187
2370
+ 35416
2371
+ 69597
2372
+ 58584
2373
+ 66259
2374
+ 7491
2375
+ 65360
2376
+ 75314
2377
+ 821
2378
+ 18332
2379
+ 1711
2380
+ 23794
2381
+ 14354
2382
+ 61257
2383
+ 16980
2384
+ 24627
2385
+ 37079
2386
+ 54852
2387
+ 44977
2388
+ 50079
2389
+ 69527
2390
+ 61641
2391
+ 49762
2392
+ 66310
2393
+ 70433
2394
+ 3353
2395
+ 70825
2396
+ 8579
2397
+ 76251
2398
+ 44063
2399
+ 14777
2400
+ 63385
2401
+ 65840
2402
+ 13926
2403
+ 51683
2404
+ 28867
2405
+ 59584
2406
+ 24007
2407
+ 67825
2408
+ 2333
2409
+ 75009
2410
+ 26025
2411
+ 20768
2412
+ 39768
2413
+ 67349
2414
+ 861
2415
+ 68222
2416
+ 35865
2417
+ 46997
2418
+ 46337
2419
+ 51607
2420
+ 15903
2421
+ 9506
2422
+ 69980
2423
+ 64110
2424
+ 7769
2425
+ 50912
2426
+ 38212
2427
+ 52069
2428
+ 41820
2429
+ 38003
2430
+ 67958
2431
+ 42897
2432
+ 31494
2433
+ 17309
2434
+ 32461
2435
+ 36202
2436
+ 16042
2437
+ 60928
2438
+ 26273
2439
+ 60780
2440
+ 1381
2441
+ 58595
2442
+ 54532
2443
+ 58552
2444
+ 57345
2445
+ 5680
2446
+ 64941
2447
+ 61645
2448
+ 80273
2449
+ 43461
2450
+ 12079
2451
+ 1680
2452
+ 51251
2453
+ 80244
2454
+ 77863
2455
+ 17236
2456
+ 24878
2457
+ 45430
2458
+ 16830
2459
+ 67839
2460
+ 1319
2461
+ 71663
2462
+ 12093
2463
+ 35676
2464
+ 16539
2465
+ 53250
2466
+ 2628
2467
+ 39089
2468
+ 35090
2469
+ 53686
2470
+ 46459
2471
+ 17739
2472
+ 9256
2473
+ 22366
2474
+ 54259
2475
+ 39090
2476
+ 20666
2477
+ 25709
2478
+ 34698
2479
+ 13232
2480
+ 6691
2481
+ 54136
2482
+ 1413
2483
+ 79483
2484
+ 10756
2485
+ 74962
2486
+ 79645
2487
+ 13803
2488
+ 16293
2489
+ 45189
2490
+ 64463
2491
+ 27257
2492
+ 45797
2493
+ 28976
2494
+ 2568
2495
+ 11812
2496
+ 43290
2497
+ 43334
2498
+ 62500
2499
+ 22862
2500
+ 73662
2501
+ 60989
2502
+ 71471
2503
+ 49924
2504
+ 12662
2505
+ 60943
2506
+ 25229
2507
+ 21062
2508
+ 13544
2509
+ 63619
2510
+ 2941
2511
+ 9031
2512
+ 6737
2513
+ 19453
2514
+ 16928
2515
+ 78431
2516
+ 28674
2517
+ 5001
2518
+ 37639
2519
+ 36585
2520
+ 23793
2521
+ 71163
2522
+ 75182
2523
+ 22897
2524
+ 62553
2525
+ 28471
2526
+ 13744
2527
+ 6996
2528
+ 26448
2529
+ 14397
2530
+ 21105
2531
+ 15863
2532
+ 74276
2533
+ 3193
2534
+ 23061
2535
+ 29032
2536
+ 29925
2537
+ 397
2538
+ 36538
2539
+ 65359
2540
+ 25197
2541
+ 71693
2542
+ 71195
2543
+ 39006
2544
+ 30237
2545
+ 19295
2546
+ 10210
2547
+ 5289
2548
+ 38800
2549
+ 66970
2550
+ 45351
2551
+ 34496
2552
+ 14567
2553
+ 56284
2554
+ 64862
2555
+ 76287
2556
+ 52452
2557
+ 3720
2558
+ 16709
2559
+ 51260
2560
+ 29176
2561
+ 47673
2562
+ 27993
2563
+ 9339
2564
+ 59514
2565
+ 25042
2566
+ 3646
2567
+ 76958
2568
+ 70058
2569
+ 63553
2570
+ 3974
2571
+ 51359
2572
+ 54768
2573
+ 56514
2574
+ 36525
2575
+ 64585
2576
+ 27027
2577
+ 6948
2578
+ 5464
2579
+ 47226
2580
+ 13217
2581
+ 62960
2582
+ 25701
2583
+ 69692
2584
+ 29942
2585
+ 26502
2586
+ 36651
2587
+ 1591
2588
+ 36023
2589
+ 35774
2590
+ 25901
2591
+ 8171
2592
+ 44558
2593
+ 52
2594
+ 15664
2595
+ 19096
2596
+ 78547
2597
+ 56889
2598
+ 45647
2599
+ 14903
2600
+ 52030
2601
+ 65874
2602
+ 44307
2603
+ 64975
2604
+ 33793
2605
+ 56257
2606
+ 34857
2607
+ 34846
2608
+ 20711
2609
+ 66876
2610
+ 25118
2611
+ 31895
2612
+ 32366
2613
+ 68431
2614
+ 34032
2615
+ 38405
2616
+ 57450
2617
+ 52192
2618
+ 20563
2619
+ 10314
2620
+ 31659
2621
+ 3204
2622
+ 53978
2623
+ 16995
2624
+ 27526
2625
+ 74018
2626
+ 45513
2627
+ 48555
2628
+ 16163
2629
+ 70998
2630
+ 68387
2631
+ 65345
2632
+ 13757
2633
+ 67647
2634
+ 48633
2635
+ 62813
2636
+ 19473
2637
+ 52391
2638
+ 57986
2639
+ 19400
2640
+ 38452
2641
+ 33140
2642
+ 60945
2643
+ 36873
2644
+ 73426
2645
+ 9707
2646
+ 51330
2647
+ 10062
2648
+ 58809
2649
+ 75163
2650
+ 37190
2651
+ 30660
2652
+ 4742
2653
+ 75838
2654
+ 29744
2655
+ 71827
2656
+ 22011
2657
+ 35369
2658
+ 49125
2659
+ 53653
2660
+ 54214
2661
+ 64567
2662
+ 3716
2663
+ 72797
2664
+ 24322
2665
+ 60476
2666
+ 33840
2667
+ 71895
2668
+ 42547
2669
+ 35997
2670
+ 59654
2671
+ 45844
2672
+ 54311
2673
+ 50293
2674
+ 67385
2675
+ 6218
2676
+ 61096
2677
+ 31111
2678
+ 4206
2679
+ 69379
2680
+ 54531
2681
+ 34483
2682
+ 23259
2683
+ 50386
2684
+ 8879
2685
+ 9821
2686
+ 57116
2687
+ 69547
2688
+ 25373
2689
+ 29969
2690
+ 31660
2691
+ 34503
2692
+ 17120
2693
+ 48321
2694
+ 70244
2695
+ 18056
2696
+ 50105
2697
+ 22849
2698
+ 28174
2699
+ 2368
2700
+ 44320
2701
+ 67124
2702
+ 586
2703
+ 74218
2704
+ 47625
2705
+ 54263
2706
+ 8773
2707
+ 63514
2708
+ 58201
2709
+ 41232
2710
+ 61867
2711
+ 31471
2712
+ 56094
2713
+ 2342
2714
+ 4634
2715
+ 70231
2716
+ 15533
2717
+ 18025
2718
+ 63507
2719
+ 20975
2720
+ 74488
2721
+ 30107
2722
+ 47758
2723
+ 67276
2724
+ 74875
2725
+ 5900
2726
+ 1818
2727
+ 73092
2728
+ 45710
2729
+ 57289
2730
+ 21206
2731
+ 78052
2732
+ 8741
2733
+ 16284
2734
+ 34725
2735
+ 65190
2736
+ 13870
2737
+ 22089
2738
+ 41607
2739
+ 55252
2740
+ 66394
2741
+ 24942
2742
+ 17855
2743
+ 61279
2744
+ 1786
2745
+ 32806
2746
+ 70249
2747
+ 25647
2748
+ 75833
2749
+ 45878
2750
+ 42020
2751
+ 30875
2752
+ 15257
2753
+ 32675
2754
+ 39209
2755
+ 51
2756
+ 58655
2757
+ 12457
2758
+ 44140
2759
+ 16611
2760
+ 8770
2761
+ 25531
2762
+ 8161
2763
+ 55431
2764
+ 68143
2765
+ 56929
2766
+ 22020
2767
+ 45964
2768
+ 18953
2769
+ 19308
2770
+ 59888
2771
+ 28680
2772
+ 41313
2773
+ 68640
2774
+ 78474
2775
+ 22069
2776
+ 60773
2777
+ 19510
2778
+ 80291
2779
+ 27982
2780
+ 12397
2781
+ 41441
2782
+ 3872
2783
+ 1564
2784
+ 18326
2785
+ 36957
2786
+ 12947
2787
+ 6766
2788
+ 16470
2789
+ 33858
2790
+ 54592
2791
+ 74726
2792
+ 65741
2793
+ 28713
2794
+ 8347
2795
+ 31179
2796
+ 50910
2797
+ 4774
2798
+ 8271
2799
+ 5735
2800
+ 52638
2801
+ 55055
2802
+ 35454
2803
+ 73313
2804
+ 28155
2805
+ 712
2806
+ 73736
2807
+ 50228
2808
+ 51345
2809
+ 7831
2810
+ 56832
2811
+ 74072
2812
+ 8138
2813
+ 33189
2814
+ 20661
2815
+ 46398
2816
+ 15151
2817
+ 68620
2818
+ 16777
2819
+ 54030
2820
+ 64353
2821
+ 51392
2822
+ 2488
2823
+ 12001
2824
+ 45499
2825
+ 54651
2826
+ 21743
2827
+ 56531
2828
+ 19129
2829
+ 57675
2830
+ 55539
2831
+ 40631
2832
+ 36491
2833
+ 69192
2834
+ 53735
2835
+ 30160
2836
+ 50485
2837
+ 4971
2838
+ 24202
2839
+ 18604
2840
+ 13403
2841
+ 12164
2842
+ 10524
2843
+ 9518
2844
+ 2877
2845
+ 36107
2846
+ 78102
2847
+ 20653
2848
+ 21157
2849
+ 65081
2850
+ 309
2851
+ 18002
2852
+ 70974
2853
+ 47077
2854
+ 69415
2855
+ 78255
2856
+ 42517
2857
+ 68486
2858
+ 32751
2859
+ 20353
2860
+ 39780
2861
+ 28133
2862
+ 41578
2863
+ 15011
2864
+ 72168
2865
+ 33238
2866
+ 4115
2867
+ 62444
2868
+ 58391
2869
+ 5631
2870
+ 15776
2871
+ 17845
2872
+ 63752
2873
+ 26333
2874
+ 28833
2875
+ 76971
2876
+ 43396
2877
+ 58884
2878
+ 80351
2879
+ 36297
2880
+ 37337
DataPreparation/data/train.txt ADDED
The diff for this file is too large to render. See raw diff
 
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.7
3
+
4
+ # Set the working directory to /app
5
+ WORKDIR /app
6
+
7
+ # Copy the current directory contents into the container at /app
8
+ COPY . /app
9
+
10
+ # Install any needed packages specified in requirements.txt
11
+ RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117 -U
12
+ RUN pip install django opencv-python scipy pandas shapely -U
13
+
14
+ # Expose the port the app runs on
15
+ EXPOSE 8000
16
+
17
+ # Define environment variable
18
+ ENV NAME g2p_app
19
+
20
+ # Run app.py when the container launches
21
+ CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
Graph2plan ADDED
@@ -0,0 +1 @@
 
 
1
+ Subproject commit 3c6af231f52c38afaf4a0025ceffbc2e5afa7ada
Interface/House/__init__.py ADDED
File without changes
Interface/House/__pycache__/__init__.cpython-311.pyc ADDED
Binary file (191 Bytes). View file
 
Interface/House/__pycache__/__init__.cpython-37.pyc ADDED
Binary file (157 Bytes). View file
 
Interface/House/__pycache__/settings.cpython-311.pyc ADDED
Binary file (3.1 kB). View file
 
Interface/House/__pycache__/settings.cpython-37.pyc ADDED
Binary file (2.38 kB). View file
 
Interface/House/__pycache__/urls.cpython-311.pyc ADDED
Binary file (1.92 kB). View file
 
Interface/House/__pycache__/urls.cpython-37.pyc ADDED
Binary file (1.4 kB). View file
 
Interface/House/__pycache__/wsgi.cpython-37.pyc ADDED
Binary file (536 Bytes). View file
 
Interface/House/asgi.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ ASGI config for House project.
3
+
4
+ It exposes the ASGI callable as a module-level variable named ``application``.
5
+
6
+ For more information on this file, see
7
+ https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
8
+ """
9
+
10
+ import os
11
+
12
+ from django.core.asgi import get_asgi_application
13
+
14
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'House.settings')
15
+
16
+ application = get_asgi_application()
Interface/House/settings.py ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Django settings for House project.
3
+
4
+ Generated by 'django-admin startproject' using Django 3.0.2.
5
+
6
+ For more information on this file, see
7
+ https://docs.djangoproject.com/en/3.0/topics/settings/
8
+
9
+ For the full list of settings and their values, see
10
+ https://docs.djangoproject.com/en/3.0/ref/settings/
11
+ """
12
+
13
+ import os
14
+
15
+ # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16
+ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17
+
18
+
19
+ # Quick-start development settings - unsuitable for production
20
+ # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
21
+
22
+ # SECURITY WARNING: keep the secret key used in production secret!
23
+ SECRET_KEY = 'y&ol628+upm0r&=8pilr@u_w_0ji!1afp!st*y#ympn3u@!3s%'
24
+
25
+ # SECURITY WARNING: don't run with debug turned on in production!
26
+ DEBUG = True
27
+
28
+ ALLOWED_HOSTS = []
29
+
30
+
31
+ # Application definition
32
+
33
+ INSTALLED_APPS = [
34
+ 'django.contrib.admin',
35
+ 'django.contrib.auth',
36
+ 'django.contrib.contenttypes',
37
+ 'django.contrib.sessions',
38
+ 'django.contrib.messages',
39
+ 'django.contrib.staticfiles',
40
+ ]
41
+
42
+ MIDDLEWARE = [
43
+ 'django.middleware.security.SecurityMiddleware',
44
+ 'django.contrib.sessions.middleware.SessionMiddleware',
45
+ 'django.middleware.common.CommonMiddleware',
46
+ 'django.middleware.csrf.CsrfViewMiddleware',
47
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
48
+ 'django.contrib.messages.middleware.MessageMiddleware',
49
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
50
+ ]
51
+
52
+ ROOT_URLCONF = 'House.urls'
53
+
54
+ TEMPLATES = [
55
+ {
56
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
57
+ 'DIRS': [os.path.join(BASE_DIR, 'templates')]
58
+ ,
59
+ 'APP_DIRS': True,
60
+ 'OPTIONS': {
61
+ 'context_processors': [
62
+ 'django.template.context_processors.debug',
63
+ 'django.template.context_processors.request',
64
+ 'django.contrib.auth.context_processors.auth',
65
+ 'django.contrib.messages.context_processors.messages',
66
+ ],
67
+ },
68
+ },
69
+ ]
70
+
71
+ WSGI_APPLICATION = 'House.wsgi.application'
72
+
73
+
74
+ # Database
75
+ # https://docs.djangoproject.com/en/3.0/ref/settings/#databases
76
+
77
+ DATABASES = {
78
+ 'default': {
79
+ 'ENGINE': 'django.db.backends.sqlite3',
80
+ 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
81
+ }
82
+ }
83
+
84
+
85
+ # Password validation
86
+ # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
87
+
88
+ AUTH_PASSWORD_VALIDATORS = [
89
+ {
90
+ 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
91
+ },
92
+ {
93
+ 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
94
+ },
95
+ {
96
+ 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
97
+ },
98
+ {
99
+ 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
100
+ },
101
+ ]
102
+
103
+
104
+ # Internationalization
105
+ # https://docs.djangoproject.com/en/3.0/topics/i18n/
106
+
107
+ LANGUAGE_CODE = 'en-us'
108
+
109
+ TIME_ZONE = 'UTC'
110
+
111
+ USE_I18N = True
112
+
113
+ USE_L10N = True
114
+
115
+ USE_TZ = True
116
+
117
+
118
+ # Static files (CSS, JavaScript, Images)
119
+ # https://docs.djangoproject.com/en/3.0/howto/static-files/
120
+
121
+ STATIC_URL = '/static/'
122
+ HERE = os.path.dirname(os.path.abspath(__file__))
123
+ HERE = os.path.join(HERE, '../')
124
+ STATICFILES_DIRS = (
125
+ os.path.join(HERE, 'static/'),
126
+ )
127
+ ALLOWED_HOSTS = ['*']
Interface/House/urls.py ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """House URL Configuration
2
+
3
+ The `urlpatterns` list routes URLs to views. For more information please see:
4
+ https://docs.djangoproject.com/en/3.0/topics/http/urls/
5
+ Examples:
6
+ Function views
7
+ 1. Add an import: from my_app import views
8
+ 2. Add a URL to urlpatterns: path('', views.home, name='home')
9
+ Class-based views
10
+ 1. Add an import: from other_app.views import Home
11
+ 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12
+ Including another URLconf
13
+ 1. Import the include() function: from django.urls import include, path
14
+ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15
+ """
16
+ from django.contrib import admin
17
+ from django.urls import path
18
+
19
+ from Houseweb import views
20
+
21
+ urlpatterns = [
22
+ # path('admin/', admin.site.urls),
23
+ path('index/LoadTestBoundary', views.LoadTestBoundary),
24
+ path('index/NumSearch/', views.NumSearch),
25
+ path(r'index/LoadTrainHouse/', views.LoadTrainHouse),
26
+ path(r'index/TransGraph/', views.TransGraph),
27
+ path(r'index/TransGraph_net/', views.TransGraph_net),
28
+ path(r'index/Init/', views.Init),
29
+ path(r'index/AdjustGraph/', views.AdjustGraph),
30
+ path(r'index/GraphSearch/', views.GraphSearch),
31
+ path(r'index/RelBox/', views.RelBox),
32
+ path(r'index/Save_Editbox/', views.Save_Editbox),
33
+
34
+ path('home', views.home),
35
+
36
+
37
+ ]
Interface/House/wsgi.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ WSGI config for House project.
3
+
4
+ It exposes the WSGI callable as a module-level variable named ``application``.
5
+
6
+ For more information on this file, see
7
+ https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
8
+ """
9
+
10
+ import os
11
+
12
+ from django.core.wsgi import get_wsgi_application
13
+
14
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'House.settings')
15
+
16
+ application = get_wsgi_application()
Interface/Houseweb/__init__.py ADDED
File without changes
Interface/Houseweb/__pycache__/__init__.cpython-311.pyc ADDED
Binary file (194 Bytes). View file
 
Interface/Houseweb/__pycache__/__init__.cpython-37.pyc ADDED
Binary file (160 Bytes). View file
 
Interface/Houseweb/__pycache__/create.cpython-37.pyc ADDED
Binary file (3.27 kB). View file
 
Interface/Houseweb/__pycache__/floorplan2.cpython-37.pyc ADDED
Binary file (19.5 kB). View file
 
Interface/Houseweb/__pycache__/network.cpython-37.pyc ADDED
Binary file (3.89 kB). View file
 
Interface/Houseweb/__pycache__/utils.cpython-37.pyc ADDED
Binary file (9.39 kB). View file
 
Interface/Houseweb/__pycache__/utils1.cpython-37.pyc ADDED
Binary file (7.52 kB). View file
 
Interface/Houseweb/__pycache__/views.cpython-311.pyc ADDED
Binary file (54.4 kB). View file
 
Interface/Houseweb/__pycache__/views.cpython-37.pyc ADDED
Binary file (23.6 kB). View file
 
Interface/Houseweb/admin.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from django.contrib import admin
2
+
3
+ # Register your models here.
Interface/Houseweb/apps.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from django.apps import AppConfig
2
+
3
+
4
+ class HousewebConfig(AppConfig):
5
+ name = 'Houseweb'
Interface/Houseweb/migrations/__init__.py ADDED
File without changes
Interface/Houseweb/models.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from django.db import models
2
+
3
+ # Create your models here.
Interface/Houseweb/tests.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from django.test import TestCase
2
+
3
+ # Create your tests here.
Interface/Houseweb/views.py ADDED
@@ -0,0 +1,757 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from django.shortcuts import render
2
+ from django.http import HttpResponse, JsonResponse
3
+ import json
4
+ import model.test as mltest
5
+ import model.utils as mdul
6
+ from model.floorplan import *
7
+ import retrieval.retrieval as rt
8
+ import time
9
+ import pickle
10
+ import scipy.io as sio
11
+ import numpy as np
12
+ from model.decorate import *
13
+ import math
14
+ import pandas as pd
15
+ import matlab.engine
16
+
17
+ global test_data, test_data_topk, testNameList, trainNameList
18
+ global train_data, trainNameList, trainTF, train_data_eNum, train_data_rNum
19
+ global engview, model
20
+ global tf_train, centroids, clusters
21
+
22
+
23
+ def home(request):
24
+ return render(request, "home.html", )
25
+
26
+
27
+ def Init(request):
28
+ start = time.clock()
29
+ getTestData()
30
+ getTrainData()
31
+ loadMatlabEng()
32
+ loadModel()
33
+ loadRetrieval()
34
+ end = time.clock()
35
+ print('Init(model+test+train+engine+retrieval) time: %s Seconds' % (end - start))
36
+
37
+ return HttpResponse(None)
38
+
39
+
40
+ def loadMatlabEng():
41
+ startengview = time.clock()
42
+ global engview
43
+ engview = matlab.engine.start_matlab()
44
+ engview.addpath(r'./align_fp/', nargout=0)
45
+ endengview = time.clock()
46
+ print(' matlab.engineview time: %s Seconds' % (endengview - startengview))
47
+
48
+
49
+ def loadRetrieval():
50
+ global tf_train, centroids, clusters
51
+ t1 = time.clock()
52
+ tf_train = np.load('./retrieval/tf_train.npy')
53
+ centroids = np.load('./retrieval/centroids_train.npy')
54
+ clusters = np.load('./retrieval/clusters_train.npy')
55
+ t2 = time.clock()
56
+ print('load tf/centroids/clusters', t2 - t1)
57
+
58
+
59
+ def getTestData():
60
+ start = time.clock()
61
+ global test_data, testNameList, trainNameList
62
+
63
+ test_data = pickle.load(open('./static/Data/data_test_converted.pkl', 'rb'))
64
+ test_data, testNameList, trainNameList = test_data['data'], list(test_data['testNameList']), list(
65
+ test_data['trainNameList'])
66
+ end = time.clock()
67
+ print('getTestData time: %s Seconds' % (end - start))
68
+
69
+
70
+ def getTrainData():
71
+ start = time.clock()
72
+ global train_data, trainNameList, trainTF, train_data_eNum, train_data_rNum
73
+
74
+ train_data = pickle.load(open('./static/Data/data_train_converted.pkl', 'rb'))
75
+ train_data, trainNameList, trainTF = train_data['data'], list(train_data['nameList']), list(train_data['trainTF'])
76
+
77
+ train_data_eNum = pickle.load(open('./static/Data/data_train_eNum.pkl', 'rb'))
78
+ train_data_eNum = train_data_eNum['eNum']
79
+ train_data_rNum = np.load('./static/Data/rNum_train.npy')
80
+
81
+ end = time.clock()
82
+ print('getTrainData time: %s Seconds' % (end - start))
83
+
84
+
85
+ def loadModel():
86
+ global model, train_data, trainNameList
87
+ start = time.clock()
88
+ model = mltest.load_model()
89
+ end = time.clock()
90
+ print('loadModel time: %s Seconds' % (end - start))
91
+ start = time.clock()
92
+ test = train_data[trainNameList.index("75119")]
93
+ mltest.test(model, FloorPlan(test, train=True))
94
+ end = time.clock()
95
+ print('test Model time: %s Seconds' % (end - start))
96
+
97
+
98
+ def LoadTestBoundary(request):
99
+ start = time.clock()
100
+ testName = request.GET.get('testName').split(".")[0]
101
+ test_index = testNameList.index(testName)
102
+ data = test_data[test_index]
103
+ data_js = {}
104
+ data_js["door"] = str(data.boundary[0][0]) + "," + str(data.boundary[0][1]) + "," + str(
105
+ data.boundary[1][0]) + "," + str(data.boundary[1][1])
106
+ ex = ""
107
+ for i in range(len(data.boundary)):
108
+ ex = ex + str(data.boundary[i][0]) + "," + str(data.boundary[i][1]) + " "
109
+ data_js['exterior'] = ex
110
+ end = time.clock()
111
+ print('LoadTestBoundary time: %s Seconds' % (end - start))
112
+ return HttpResponse(json.dumps(data_js), content_type="application/json")
113
+
114
+
115
+ def get_filter_func(mask, acc, num):
116
+ filters = [
117
+ None if not mask else (
118
+ np.equal if acc[i] else np.greater_equal
119
+ )
120
+ for i in range(len(mask))
121
+ ]
122
+
123
+ def filter_func(data):
124
+ for i in range(len(filters)):
125
+ if (filters[i] is not None) and (not filters[i](data[i], num[i])): return False
126
+ return True
127
+
128
+ return filter_func
129
+
130
+
131
+ def filter_graph(graph_):
132
+ filters = graph_
133
+
134
+ def filter_graphfunc(data):
135
+ sub = data - filters
136
+ return ((sub >= 0).all())
137
+
138
+ return filter_graphfunc
139
+
140
+
141
+ def NumSearch(request):
142
+ start = time.clock()
143
+ data_new = json.loads(request.GET.get("userInfo"))
144
+ testName = data_new[0].split(".")[0]
145
+ test_index = testNameList.index(testName)
146
+ topkList = []
147
+ topkList.clear()
148
+ data = test_data[test_index]
149
+
150
+
151
+ multi_clusters=False
152
+ test_data_topk = rt.retrieval(data, 1000,multi_clusters)
153
+
154
+ if len(data_new) > 1:
155
+ roomactarr = data_new[1]
156
+ roomexaarr = data_new[2]
157
+ roomnumarr = [int(x) for x in data_new[3]]
158
+
159
+ test_num = train_data_rNum[test_data_topk]
160
+ filter_func = get_filter_func(roomactarr, roomexaarr, roomnumarr)
161
+ indices = np.where(list(map(filter_func, test_num)))
162
+ indices = list(indices)
163
+ if len(indices[0]) < 20:
164
+ topk = len(indices[0])
165
+ else:
166
+ topk = 20
167
+ topkList.clear()
168
+ for i in range(topk):
169
+ topkList.append(str(trainNameList[int(test_data_topk[indices[0][i]])]) + ".png")
170
+ end = time.clock()
171
+ print('NumberSearch time: %s Seconds' % (end - start))
172
+ return HttpResponse(json.dumps(topkList), content_type="application/json")
173
+
174
+
175
+ def FindTraindata(trainname):
176
+ start = time.clock()
177
+ train_index = trainNameList.index(trainname)
178
+ data = train_data[train_index]
179
+ data_js = {}
180
+ data_js["hsname"] = trainname
181
+
182
+ data_js["door"] = str(data.boundary[0][0]) + "," + str(data.boundary[0][1]) + "," + str(
183
+ data.boundary[1][0]) + "," + str(data.boundary[1][1])
184
+ print("testboundary", data_js["door"])
185
+ ex = ""
186
+ for i in range(len(data.boundary)):
187
+ ex = ex + str(data.boundary[i][0]) + "," + str(data.boundary[i][1]) + " "
188
+ data_js['exterior'] = ex
189
+
190
+ data_js["hsedge"] = [[int(u), int(v)] for u, v in data.edge[:, [0, 1]]]
191
+
192
+ hsbox = [[[float(x1), float(y1), float(x2), float(y2)], [mdul.room_label[cate][1]]] for
193
+ x1, y1, x2, y2, cate in data.box[:]]
194
+ external = np.asarray(data.boundary)
195
+ xmin, xmax = np.min(external[:, 0]), np.max(external[:, 0])
196
+ ymin, ymax = np.min(external[:, 1]), np.max(external[:, 1])
197
+
198
+ area_ = (ymax - ymin) * (xmax - xmin)
199
+
200
+ data_js["rmsize"] = [
201
+ [[20 * math.sqrt((float(x2) - float(x1)) * (float(y2) - float(y1)) / float(area_))], [mdul.room_label[cate][1]]]
202
+ for
203
+ x1, y1, x2, y2, cate in data.box[:]]
204
+
205
+
206
+ box_order = data.order
207
+ data_js["hsbox"] = []
208
+ for i in range(len(box_order)):
209
+ data_js["hsbox"].append(hsbox[int(float(box_order[i])) - 1])
210
+
211
+ data_js["rmpos"] = [[int(cate), str(mdul.room_label[cate][1]), float((x1 + x2) / 2), float((y1 + y2) / 2)] for
212
+ x1, y1, x2, y2, cate in data.box[:]]
213
+ end = time.clock()
214
+ print('find train data time: %s Seconds' % (end - start))
215
+ return data_js
216
+
217
+
218
+ def LoadTrainHouse(request):
219
+ trainname = request.GET.get("roomID").split(".")[0]
220
+ data_js = FindTraindata(trainname)
221
+ return HttpResponse(json.dumps(data_js), content_type="application/json")
222
+
223
+
224
+ '''
225
+ transfer the graph of the training data into the graph of the test data
226
+ '''
227
+
228
+
229
+ def TransGraph(request):
230
+ start = time.clock()
231
+ userInfo = request.GET.get("userInfo")
232
+ testname = userInfo.split(',')[0]
233
+ trainname = request.GET.get("roomID")
234
+ mlresult = mltest.get_userinfo(testname, trainname)
235
+
236
+ fp_end = mlresult
237
+
238
+ sio.savemat("./static/" + userInfo.split(',')[0].split('.')[0] + ".mat", {"data": fp_end.data})
239
+
240
+ data_js = {}
241
+ # fp_end hsedge
242
+ data_js["hsedge"] = (fp_end.get_triples(tensor=False)[:, [0, 2, 1]]).astype(np.float).tolist()
243
+
244
+ # fp_rmsize
245
+ external = np.asarray(fp_end.data.boundary)
246
+ xmin, xmax = np.min(external[:, 0]), np.max(external[:, 0])
247
+ ymin, ymax = np.min(external[:, 1]), np.max(external[:, 1])
248
+ area_ = (ymax - ymin) * (xmax - xmin)
249
+ data_js["rmsize"] = [
250
+ [[20 * math.sqrt((float(x2) - float(x1)) * (float(y2) - float(y1)) / float(area_))], [mdul.room_label[cate][1]]]
251
+ for
252
+ x1, y1, x2, y2, cate in fp_end.data.box[:]]
253
+ # fp_end rmpos
254
+
255
+ rooms = fp_end.get_rooms(tensor=False)
256
+
257
+
258
+ center = [[(x1 + x2) / 2, (y1 + y2) / 2] for x1, y1, x2, y2 in fp_end.data.box[:, :4]]
259
+
260
+ # boxes_pred
261
+ data_js["rmpos"] = []
262
+ for k in range(len(center)):
263
+ node = float(rooms[k]), mdul.room_label[int(rooms[k])][1], center[k][0], center[k][1], float(k)
264
+ data_js["rmpos"].append(node)
265
+
266
+ test_index = testNameList.index(testname.split(".")[0])
267
+ data = test_data[test_index]
268
+ ex = ""
269
+ for i in range(len(data.boundary)):
270
+ ex = ex + str(data.boundary[i][0]) + "," + str(data.boundary[i][1]) + " "
271
+ data_js['exterior'] = ex
272
+ data_js["door"] = str(data.boundary[0][0]) + "," + str(data.boundary[0][1]) + "," + str(
273
+ data.boundary[1][0]) + "," + str(data.boundary[1][1])
274
+ end = time.clock()
275
+ print('TransGraph time: %s Seconds' % (end - start))
276
+ return HttpResponse(json.dumps(data_js), content_type="application/json")
277
+
278
+
279
+ def AdjustGraph(request):
280
+ start = time.clock()
281
+ # newNode index-typename-cx-cy
282
+ # oldNode index-typename-cx-cy
283
+ # newEdge u-v
284
+ NewGraph = json.loads(request.GET.get("NewGraph"))
285
+ testname = request.GET.get("userRoomID")
286
+ trainname = request.GET.get("adptRoomID")
287
+ s = time.clock()
288
+ mlresult = mltest.get_userinfo_adjust(testname, trainname, NewGraph)
289
+ e = time.clock()
290
+ print('get_userinfo_adjust: %s Seconds' % (e - s))
291
+ fp_end = mlresult[0]
292
+ global boxes_pred
293
+ boxes_pred = mlresult[1]
294
+
295
+ data_js = {}
296
+ data_js["hsedge"] = (fp_end.get_triples(tensor=False)[:, [0, 2, 1]]).astype(np.float).tolist()
297
+
298
+ rooms = fp_end.get_rooms(tensor=False)
299
+ center = [[(x1 + x2) / 2, (y1 + y2) / 2] for x1, y1, x2, y2 in fp_end.data.box[:, :4]]
300
+
301
+ box_order = mlresult[2]
302
+ '''
303
+ handle the information of the room boxes
304
+ boxes_pred: the prediction from net
305
+ box_order: The order in which boxes are drawn
306
+
307
+ '''
308
+ room = []
309
+ for o in range(len(box_order)):
310
+ room.append(float((rooms[int(float(box_order[o][0])) - 1])))
311
+ boxes_end = []
312
+ for i in range(len(box_order)):
313
+ tmp = []
314
+ for j in range(4):
315
+ tmp.append(float(boxes_pred[int(float(box_order[i][0])) - 1][j]))
316
+ boxes_end.append(tmp)
317
+
318
+ data_js['roomret'] = []
319
+ for k in range(len(room)):
320
+ data = boxes_end[k], [mdul.room_label[int(room[k])][1]], box_order[k][0] - 1
321
+ data_js['roomret'].append(data)
322
+
323
+ # change the box size
324
+ global relbox
325
+ relbox = data_js['roomret']
326
+ global reledge
327
+ reledge = data_js["hsedge"]
328
+
329
+ test_index = testNameList.index(testname.split(".")[0])
330
+ data = test_data[test_index]
331
+ ex = ""
332
+ for i in range(len(data.boundary)):
333
+ ex = ex + str(data.boundary[i][0]) + "," + str(data.boundary[i][1]) + " "
334
+ data_js['exterior'] = ex
335
+ data_js["door"] = str(data.boundary[0][0]) + "," + str(data.boundary[0][1]) + "," + str(
336
+ data.boundary[1][0]) + "," + str(data.boundary[1][1])
337
+
338
+ external = np.asarray(data.boundary)
339
+ xmin, xmax = np.min(external[:, 0]), np.max(external[:, 0])
340
+ ymin, ymax = np.min(external[:, 1]), np.max(external[:, 1])
341
+ area_ = (ymax - ymin) * (xmax - xmin)
342
+ data_js['rmsize'] = []
343
+ for i in range(len(data_js['roomret'])):
344
+ rmsize = 20 * math.sqrt((float(data_js['roomret'][i][0][2]) - float(data_js['roomret'][i][0][0])) * (
345
+ float(data_js['roomret'][i][0][3]) - float(data_js['roomret'][i][0][1])) / float(area_)), \
346
+ data_js["roomret"][i][1][0]
347
+ data_js["rmsize"].append(rmsize)
348
+
349
+ data_js["rmpos"] = []
350
+
351
+ newGraph = NewGraph[0]
352
+ for i in range(len(data_js['roomret'])):
353
+ for k in range(len(newGraph)):
354
+ if (data_js['roomret'][i][1][0] == newGraph[k][1]):
355
+ x_center = int((data_js['roomret'][i][0][0] + data_js['roomret'][i][0][2]) / 2)
356
+ y_center = int((data_js['roomret'][i][0][1] + data_js['roomret'][i][0][3]) / 2)
357
+ x_graph = newGraph[k][2]
358
+ y_graph = newGraph[k][3]
359
+ if ((int(x_graph - 30) < x_center < int(x_graph + 30))):
360
+ node = float(rooms[k]), newGraph[k][1], x_center, y_center, float(
361
+ newGraph[k][0])
362
+ data_js["rmpos"].append(node)
363
+ newGraph.pop(k)
364
+ break
365
+ if ((int(y_graph - 30) < y_center < int(y_graph + 30))):
366
+ node = float(rooms[k]), newGraph[k][1], x_center, y_center, float(
367
+ newGraph[k][0])
368
+ data_js["rmpos"].append(node)
369
+ newGraph.pop(k)
370
+
371
+ break
372
+
373
+ fp_end.data = add_dw_fp(fp_end.data)
374
+ data_js["indoor"] = []
375
+
376
+ boundary = data.boundary
377
+
378
+ isNew = boundary[:, 3]
379
+ frontDoor = boundary[[0, 1]]
380
+ frontDoor = frontDoor[:, [0, 1]]
381
+ frontsum = frontDoor.sum(axis=1).tolist()
382
+ idx = frontsum.index(min(frontsum))
383
+ wallThickness = 3
384
+ if idx == 1:
385
+ frontDoor = frontDoor[[1, 0], :]
386
+ orient = boundary[0][2]
387
+ if orient == 0 or orient == 2:
388
+ frontDoor[0][0] = frontDoor[0][0] + wallThickness / 4
389
+ frontDoor[1][0] = frontDoor[1][0] - wallThickness / 4
390
+ if orient == 1 or orient == 3:
391
+ frontDoor[0][1] = frontDoor[0][1] + wallThickness / 4
392
+ frontDoor[1][1] = frontDoor[1][1] - wallThickness / 4
393
+
394
+
395
+ data_js["windows"] = []
396
+ for indx, x, y, w, h, r in fp_end.data.windows:
397
+ if w != 0:
398
+ tmp = [x + 2, y - 2, w - 2, 4]
399
+ data_js["windows"].append(tmp)
400
+ if h != 0:
401
+ tmp = [x - 2, y, 4, h]
402
+ data_js["windows"].append(tmp)
403
+ data_js["windowsline"] = []
404
+ for indx, x, y, w, h, r in fp_end.data.windows:
405
+ if w != 0:
406
+ tmp = [x + 2, y, w + x, y]
407
+ data_js["windowsline"].append(tmp)
408
+ if h != 0:
409
+ tmp = [x, y, x, h + y]
410
+ data_js["windowsline"].append(tmp)
411
+
412
+ sio.savemat("./static/" + testname.split(',')[0].split('.')[0] + ".mat", {"data": fp_end.data})
413
+
414
+ end = time.clock()
415
+ print('AdjustGraph time: %s Seconds' % (end - start))
416
+ return HttpResponse(json.dumps(data_js), content_type="application/json")
417
+
418
+
419
+ def RelBox(request):
420
+ id = request.GET.get("selectRect")
421
+ print(id)
422
+ global relbox
423
+ global reledge
424
+ rdirgroup=get_dir(id,relbox,reledge)
425
+ return HttpResponse(json.dumps(rdirgroup), content_type="application/json")
426
+
427
+ def get_dir(id,relbox,reledge):
428
+ rel = []
429
+ selectindex = int(id.split("_")[1])
430
+ select = np.zeros(4).astype(int)
431
+ for i in range(len(relbox)):
432
+ a = math.ceil(relbox[i][0][0]), math.ceil(relbox[i][0][1]), math.ceil(relbox[i][0][2]), math.ceil(
433
+ relbox[i][0][3]), int(relbox[i][2])
434
+ rel.append(a)
435
+ if (selectindex == int(relbox[i][2])):
436
+ # select:x1,x0,y0,y1.relbox:x0,y0,x1,y1
437
+ select[0] = math.ceil(relbox[i][0][2])
438
+ select[1] = math.ceil(relbox[i][0][0])
439
+ select[2] = math.ceil(relbox[i][0][1])
440
+ select[3] = math.ceil(relbox[i][0][3])
441
+ rel = np.array(rel)
442
+ df = pd.DataFrame({'x0': rel[:, 0], 'y0': rel[:, 1], 'x1': rel[:, 2], 'y1': rel[:, 3], 'rindex': rel[:, 4]})
443
+ group_label = [(0, 'x1', "right"),
444
+ (1, 'x0', "left"),
445
+ (2, 'y0', "top"),
446
+ (3, 'y1', "down")]
447
+ dfgroup = []
448
+ for i in range(len(group_label)):
449
+ dfgroup.append(df.groupby(group_label[i][1], as_index=True).get_group(name=select[i]))
450
+ rdirgroup = []
451
+ for i in range(len(dfgroup)):
452
+ dir = dfgroup[i]
453
+ rdir = []
454
+ for k in range(len(dir)):
455
+ idx = (dir.loc[dir['rindex'] == (dir.iloc[[k]].values)[0][4]].index.values)[0]
456
+ rdir.append(relbox[idx][1][0].__str__() + "_" + (dir.iloc[[k]].values)[0][4].__str__())
457
+ rdirgroup.append(rdir)
458
+ reledge = np.array(reledge)
459
+ data1 = reledge[np.where((reledge[:, [0]] == selectindex))[0]]
460
+ data2 = reledge[np.where((reledge[:, [1]] == selectindex))[0]]
461
+ reledge1 = np.vstack((data1, data2))
462
+ return rdirgroup
463
+ def Save_Editbox(request):
464
+ global indxlist,boxes_pred
465
+ NewGraph = json.loads(request.GET.get("NewGraph"))
466
+ NewLay = json.loads(request.GET.get("NewLay"))
467
+ userRoomID = request.GET.get("userRoomID")
468
+ adptRoomID = request.GET.get("adptRoomID")
469
+
470
+ NewLay=np.array(NewLay)
471
+ NewLay=NewLay[np.argsort(NewLay[:, 1])][:,2:]
472
+ NewLay=NewLay.astype(float).tolist()
473
+
474
+ test_index = testNameList.index(userRoomID.split(".")[0])
475
+ test_ = test_data[test_index]
476
+
477
+ Boundary = test_.boundary
478
+ boundary=[[float(x),float(y),float(z),float(k)] for x,y,z,k in list(Boundary)]
479
+ test_fp =FloorPlan(test_)
480
+
481
+ train_index = trainNameList.index(adptRoomID.split(".")[0])
482
+ train_ =train_data[train_index]
483
+ train_fp =FloorPlan(train_,train=True)
484
+ fp_end = test_fp.adapt_graph(train_fp)
485
+ fp_end.adjust_graph()
486
+ newNode = NewGraph[0]
487
+ newEdge = NewGraph[1]
488
+ oldNode = NewGraph[2]
489
+ temp = []
490
+ for newindx, newrmname, newx, newy,scalesize in newNode:
491
+ for type, oldrmname, oldx, oldy, oldindx in oldNode:
492
+ if (int(newindx) == oldindx):
493
+ tmp=int(newindx), (newx - oldx), ( newy- oldy),float(scalesize)
494
+ temp.append(tmp)
495
+ newbox=[]
496
+ if mltest.adjust==True:
497
+ oldbox = []
498
+ for i in range(len(boxes_pred)):
499
+ indxtmp=[boxes_pred[i][0],boxes_pred[i][1],boxes_pred[i][2],boxes_pred[i][3],boxes_pred[i][0]]
500
+ oldbox.append(indxtmp)
501
+ if mltest.adjust==False:
502
+ indxlist=[]
503
+ oldbox=fp_end.data.box.tolist()
504
+ for i in range(len(oldbox)):
505
+ indxlist.append([oldbox[i][4]])
506
+ indxlist=np.array(indxlist)
507
+ adjust=True
508
+ oldbox=fp_end.data.box.tolist()
509
+ X=0
510
+ Y=0
511
+ for i in range(len(oldbox)):
512
+ X= X+(oldbox[i][2]-oldbox[i][0])
513
+ Y= Y+(oldbox[i][3]-oldbox[i][1])
514
+ x_ave=(X/len(oldbox))/2
515
+ y_ave=(Y/len(oldbox))/2
516
+
517
+ index_mapping = {}
518
+ # The room that already exists
519
+ # Move: Just by the distance
520
+ for newindx, tempx, tempy,scalesize in temp:
521
+ index_mapping[newindx] = len(newbox)
522
+ tmpbox=[]
523
+ scalesize = int(scalesize)
524
+ if scalesize<1:
525
+ scale = math.sqrt(scalesize)
526
+ scalex = (oldbox[newindx][2] - oldbox[newindx][0]) * (1 - scale) / 2
527
+ scaley = (oldbox[newindx][3] - oldbox[newindx][1]) * (1 - scale) / 2
528
+ tmpbox = [(oldbox[newindx][0] + tempx) + scalex, (oldbox[newindx][1] + tempy)+scaley,
529
+ (oldbox[newindx][2] + tempx) - scalex, (oldbox[newindx][3] + tempy) - scaley, oldbox[newindx][4]]
530
+ if scalesize == 1:
531
+ tmpbox = [(oldbox[newindx][0] + tempx) , (oldbox[newindx][1] + tempy) ,(oldbox[newindx][2] + tempx), (oldbox[newindx][3] + tempy), oldbox[newindx][4]]
532
+
533
+ if scalesize>1:
534
+ scale=math.sqrt(scalesize)
535
+ scalex = (oldbox[newindx][2] - oldbox[newindx][0]) * ( scale-1) / 2
536
+ scaley = (oldbox[newindx][3] - oldbox[newindx][1]) * (scale-1) / 2
537
+ tmpbox = [(oldbox[newindx][0] + tempx) - scalex, (oldbox[newindx][1] + tempy) - scaley,
538
+ (oldbox[newindx][2] + tempx) + scalex, (oldbox[newindx][3] + tempy) + scaley, oldbox[newindx][4]]
539
+
540
+ newbox.append(tmpbox)
541
+
542
+ # The room just added
543
+ # Move: The room node with the average size of the existing room
544
+ for newindx, newrmname, newx, newy,scalesize in newNode:
545
+ if int(newindx)>(len(oldbox)-1):
546
+ scalesize=int(scalesize)
547
+ index_mapping[int(newindx)] = (len(newbox))
548
+ tmpbox=[]
549
+ if scalesize < 1:
550
+ scale = math.sqrt(scalesize)
551
+ scalex = x_ave * (1 - scale) / 2
552
+ scaley = y_ave* (1 - scale) / 2
553
+ tmpbox = [(newx-x_ave) +scalex,(newy-y_ave) +scaley,(newx+x_ave)-scalex,(newy+y_ave)-scaley,vocab['object_name_to_idx'][newrmname]]
554
+
555
+ if scalesize == 1:
556
+ tmpbox = [(newx - x_ave), (newy - y_ave), (newx + x_ave), (newy + y_ave),vocab['object_name_to_idx'][newrmname]]
557
+ if scalesize > 1:
558
+ scale = math.sqrt(scalesize)
559
+ scalex = x_ave * (scale - 1) / 2
560
+ scaley = y_ave * (scale - 1) / 2
561
+ tmpbox = [(newx-x_ave) - scalex, (newy-y_ave) - scaley,(newx+x_ave) + scalex, (newy+y_ave) + scaley,vocab['object_name_to_idx'][newrmname]]
562
+ # tmpboxin = [(newx-x_ave) ,(newy-y_ave) ,(newx+x_ave) ,(newy+y_ave) ,vocab['object_name_to_idx'][newrmname]]
563
+ # print(tmpboxin)
564
+ # print(tmpbox)
565
+ # print(scalesize)
566
+ newbox.append(tmpbox)
567
+
568
+ fp_end.data.box=np.array(newbox)
569
+
570
+ adjust_Edge=[]
571
+ for u, v in newEdge:
572
+ tmp=[index_mapping[int(u)],index_mapping[int(v)], 0]
573
+ adjust_Edge.append(tmp)
574
+ fp_end.data.edge=np.array(adjust_Edge)
575
+ rType = fp_end.get_rooms(tensor=False)
576
+
577
+ rEdge = fp_end.get_triples(tensor=False)[:, [0, 2, 1]]
578
+ Edge = [[float(u), float(v), float(type2)] for u, v, type2 in rEdge]
579
+ Box=NewLay
580
+ boundary_mat = matlab.double(boundary)
581
+ rType_mat = matlab.double(rType.tolist())
582
+ Edge_mat = matlab.double(Edge)
583
+ Box_mat=matlab.double(Box)
584
+ fp_end.data.boundary =np.array(boundary)
585
+ fp_end.data.rType =np.array(rType).astype(int)
586
+ fp_end.data.refineBox=np.array(Box)
587
+ fp_end.data.rEdge=np.array(Edge)
588
+
589
+ box_refine = engview.align_fp(boundary_mat, Box_mat, rType_mat,Edge_mat ,18,False, nargout=3)
590
+ box_out=box_refine[0]
591
+ box_order=box_refine[1]
592
+ rBoundary=box_refine[2]
593
+ fp_end.data.newBox = np.array(box_out)
594
+ fp_end.data.order = np.array(box_order)
595
+ fp_end.data.rBoundary = [np.array(rb) for rb in rBoundary]
596
+ fp_end.data = add_dw_fp(fp_end.data)
597
+ sio.savemat("./static/" + userRoomID + ".mat", {"data": fp_end.data})
598
+ flag=1
599
+ return HttpResponse(json.dumps(flag), content_type="application/json")
600
+
601
+
602
+ def TransGraph_net(request):
603
+ userInfo = request.GET.get("userInfo")
604
+ testname = userInfo.split(',')[0]
605
+ trainname = request.GET.get("roomID")
606
+ mlresult = mltest.get_userinfo_net(testname, trainname)
607
+
608
+ fp_end = mlresult[0]
609
+ boxes_pred = mlresult[1]
610
+
611
+ data_js = {}
612
+ # fp_end hsedge
613
+ data_js["hsedge"] = (fp_end.get_triples(tensor=False)[:, [0, 2, 1]]).astype(np.float).tolist()
614
+
615
+ # fp_end rmpos
616
+ rooms = fp_end.get_rooms(tensor=False)
617
+ room = rooms
618
+ center = [[(x1 + x2) / 2, (y1 + y2) / 2] for x1, y1, x2, y2 in fp_end.data.box[:, :4]]
619
+
620
+
621
+
622
+ # boxes_pred
623
+ data_js["rmpos"] = []
624
+ for k in range(len(center)):
625
+ node = float(room[k]), mdul.room_label[int(room[k])][1], center[k][0], center[k][1]
626
+ data_js["rmpos"].append(node)
627
+ boxes_end = boxes_pred.tolist()
628
+ data_js['roomret'] = []
629
+ for k in range(len(room)):
630
+ data = boxes_end[k], [mdul.room_label[int(room[k])][1]]
631
+ data_js['roomret'].append(data)
632
+
633
+ test_index = testNameList.index(testname.split(".")[0])
634
+ data = test_data[test_index]
635
+ ex = ""
636
+ for i in range(len(data.boundary)):
637
+ ex = ex + str(data.boundary[i][0]) + "," + str(data.boundary[i][1]) + " "
638
+ data_js['exterior'] = ex
639
+ x0, x1 = np.min(data.boundary[:, 0]), np.max(data.boundary[:, 0])
640
+ y0, y1 = np.min(data.boundary[:, 1]), np.max(data.boundary[:, 1])
641
+ data_js['bbxarea'] = float((x1 - x0) * (y1 - y0))
642
+ return HttpResponse(json.dumps(data_js), content_type="application/json")
643
+
644
+
645
+ def GraphSearch(request):
646
+ s=time.clock()
647
+ # Graph
648
+ Searchtype = ["BedRoom", "Bathroom", "Kitchen", "Balcony", "Storage"]
649
+ BedRoomlist = ["MasterRoom", "SecondRoom", "GuestRoom", "ChildRoom", "StudyRoom"]
650
+ NewGraph = json.loads(request.GET.get("NewGraph"))
651
+
652
+ testname = request.GET.get("userRoomID")
653
+ newNode = NewGraph[0]
654
+ newEdge = NewGraph[1]
655
+ r_Num = np.zeros((1, 14)).tolist()
656
+ r_Mask = np.zeros((1, 14)).tolist()
657
+ r_Acc = np.zeros((1, 14)).tolist()
658
+ r_Num[0][0] = 1
659
+ r_Mask[0][0] = 1
660
+ r_Acc[0][0] = 1
661
+
662
+ for indx, rmname, x, y, scalesize in newNode:
663
+ r_Num[0][mdul.vocab['object_name_to_idx'][rmname]] = r_Num[0][mdul.vocab['object_name_to_idx'][rmname]] + 1
664
+ r_Mask[0][mdul.vocab['object_name_to_idx'][rmname]] = 1
665
+ if rmname in BedRoomlist:
666
+ r_Num[0][13] = r_Num[0][13] + 1
667
+ r_Mask[0][13] = 1
668
+
669
+ test_index = testNameList.index(testname.split(".")[0])
670
+ topkList = []
671
+ topkList.clear()
672
+ data = test_data[test_index]
673
+
674
+ Numrooms = json.loads(request.GET.get("Numrooms"))
675
+
676
+
677
+ roomactarr = Numrooms[0]
678
+ roomexaarr = Numrooms[1]
679
+ roomnumarr = [int(x) for x in Numrooms[2]]
680
+ test_data_topk=np.arange(0,74995)
681
+
682
+ if np.sum(roomactarr) != 1 or np.sum(roomexaarr) != 1 or np.sum(roomnumarr) != 1:
683
+ test_num = train_data_rNum[test_data_topk]
684
+ # Number filter
685
+
686
+ filter_func = get_filter_func(roomactarr, roomexaarr, roomnumarr)
687
+ indices = np.where(list(map(filter_func, test_num)))
688
+ # print("np.where(list(map(fil", test_num)
689
+ indices = list(indices)
690
+ test_data_topk = test_data_topk[indices[0]]
691
+
692
+ test_num = train_data_eNum[test_data_topk]
693
+ # Graph filter
694
+
695
+ edgematrix = np.zeros((5, 5))
696
+ for indx1, indx2 in newEdge:
697
+ tmp1 = ""
698
+ tmp2 = ""
699
+ for indx, rmname, x, y, scalesize in newNode:
700
+ if indx1 == indx:
701
+ if rmname in BedRoomlist:
702
+ tmp1 = "BedRoom"
703
+ else:
704
+ tmp1 = rmname
705
+ for indx, rmname, x, y, scalesize in newNode:
706
+ if indx2 == indx:
707
+ if rmname in BedRoomlist:
708
+ tmp2 = "BedRoom"
709
+ else:
710
+ tmp2 = rmname
711
+ if tmp1 != "" and tmp2 != "":
712
+ edgematrix[Searchtype.index(tmp1)][Searchtype.index(tmp2)] = edgematrix[Searchtype.index(tmp1)][
713
+ Searchtype.index(tmp2)] + 1
714
+ edgematrix[Searchtype.index(tmp2)][Searchtype.index(tmp1)] = edgematrix[Searchtype.index(tmp2)][
715
+ Searchtype.index(tmp1)] + 1
716
+ edge = edgematrix.reshape((1, 25))
717
+ filter_graphfunc = filter_graph(edge)
718
+ # rNum_list
719
+ eNumData = []
720
+
721
+ indices = np.where(list(map(filter_graphfunc, test_num)))
722
+
723
+ indices = list(indices)
724
+ tf_trainsub=tf_train[test_data_topk[indices[0]]]
725
+ re_data = train_data[test_data_topk[indices[0]]]
726
+ test_data_tftopk=retrieve_bf(tf_trainsub, data, k=20)
727
+ re_data=re_data[test_data_tftopk]
728
+ if len(re_data) < 20:
729
+ topk = len(re_data)
730
+ else:
731
+ topk = 20
732
+ topkList = []
733
+ for i in range(topk):
734
+ topkList.append(str(re_data[i].name) + ".png")
735
+
736
+ e=time.clock()
737
+ print('Graph Search time: %s Seconds' % (e - s))
738
+
739
+ print("topkList", topkList)
740
+ return HttpResponse(json.dumps(topkList), content_type="application/json")
741
+
742
+
743
+ def retrieve_bf(tf_trainsub, datum, k=20):
744
+ # compute tf for the data boundary
745
+ x, y = rt.compute_tf(datum.boundary)
746
+ y_sampled = rt.sample_tf(x, y, 1000)
747
+ dist = np.linalg.norm(y_sampled - tf_trainsub, axis=1)
748
+ if k > np.log2(len(tf_trainsub)):
749
+ index = np.argsort(dist)[:k]
750
+ else:
751
+ index = np.argpartition(dist, k)[:k]
752
+ index = index[np.argsort(dist[index])]
753
+ return index
754
+
755
+
756
+ if __name__ == "__main__":
757
+ pass
Interface/Img/data.mat.png ADDED
Interface/Img/data_test_converted.png ADDED
Interface/Img/data_train_converted.png ADDED
Interface/Img/interface.jpg ADDED
Interface/Img/paper.png ADDED
Interface/align_fp/align_adjacent_room3.m ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function [newBox, constraint] = align_adjacent_room3(box, tempBox, updated, type, threshold)
2
+ % position of box1 relative to box2
3
+ % 0 left-above
4
+ % 1 left-below
5
+ % 2 left-of
6
+ % 3 above
7
+ % 4 inside
8
+ % 5 surrounding
9
+ % 6 below
10
+ % 7 right-of
11
+ % 8 right-above
12
+ % 9 right-below
13
+
14
+
15
+ newBox = box;
16
+ constraint = zeros(4, 2);
17
+ idx = 1;
18
+
19
+ if type == 0
20
+ alignV(true);
21
+ alignH(true);
22
+ elseif type == 1
23
+ alignV(true);
24
+ alignH(false);
25
+ elseif type == 2
26
+ align([2,1], [1,3], threshold);
27
+ align([2,2], [1,2], threshold/2);
28
+ align([2,4], [1,4], threshold/2);
29
+ elseif type == 3
30
+ align([2,2], [1,4], threshold);
31
+ align([2,1], [1,1], threshold/2);
32
+ align([2,3], [1,3], threshold/2);
33
+ elseif type == 4
34
+ align([2,1], [1,1], true);
35
+ align([2,2], [1,2], true);
36
+ align([2,3], [1,3], true);
37
+ align([2,4], [1,4], true);
38
+ elseif type == 5
39
+ align([1,1], [2,1], true);
40
+ align([1,2], [2,2], true);
41
+ align([1,3], [2,3], true);
42
+ align([1,4], [2,4], true);
43
+ elseif type == 6
44
+ align([2,4], [1,2], threshold);
45
+ align([2,1], [1,1], threshold/2);
46
+ align([2,3], [1,3], threshold/2);
47
+ elseif type == 7
48
+ align([2,3], [1,1], threshold);
49
+ align([2,2], [1,2], threshold/2);
50
+ align([2,4], [1,4], threshold/2);
51
+ elseif type == 8
52
+ alignV(false);
53
+ alignH(true);
54
+ elseif type == 9
55
+ alignV(false);
56
+ alignH(false);
57
+ end
58
+
59
+ constraint = constraint(1:idx-1, :);
60
+
61
+ function alignV(isLeft)
62
+ if isLeft
63
+ idx1 = 1;
64
+ idx2 = 3;
65
+ else
66
+ idx1 = 3;
67
+ idx2 = 1;
68
+ end
69
+
70
+ if abs(tempBox(2,idx1) - tempBox(1,idx2)) <= abs(tempBox(2,idx2) - tempBox(1,idx2))
71
+ align([2,idx1], [1,idx2], threshold/2)
72
+ else
73
+ align([2,idx2], [1,idx2], threshold/2)
74
+ end
75
+ end
76
+
77
+ function alignH(isAbove)
78
+ if isAbove
79
+ idx1 = 2;
80
+ idx2 = 4;
81
+ else
82
+ idx1 = 4;
83
+ idx2 = 2;
84
+ end
85
+
86
+ if abs(tempBox(2,idx1) - tempBox(1,idx2)) <= abs(tempBox(2,idx2) - tempBox(1,idx2))
87
+ align([2,idx1], [1,idx2], threshold/2)
88
+ else
89
+ align([2,idx2], [1,idx2], threshold/2)
90
+ end
91
+ end
92
+
93
+ function align(idx1, idx2, threshold, attach)
94
+ if nargin < 4
95
+ attach = false;
96
+ end
97
+ if abs(tempBox(idx1(1),idx1(2))- tempBox(idx2(1), idx2(2))) <= threshold
98
+ if updated(idx1(1), idx1(2)) && ~updated(idx2(1), idx2(2))
99
+ newBox(idx2(1), idx2(2)) = newBox(idx1(1),idx1(2));
100
+ elseif updated(idx2(1), idx2(2)) && ~updated(idx1(1), idx1(2))
101
+ newBox(idx1(1), idx1(2)) = newBox(idx2(1),idx2(2));
102
+ elseif ~updated(idx1(1), idx1(2)) && ~updated(idx2(1), idx2(2))
103
+ if attach
104
+ newBox(idx2(1), idx2(2)) = newBox(idx1(1),idx1(2));
105
+ else
106
+ y = (newBox(idx1(1),idx1(2)) + newBox(idx2(1), idx2(2)))/2;
107
+ newBox(idx1(1),idx1(2)) = y;
108
+ newBox(idx2(1), idx2(2)) = y;
109
+ end
110
+ end
111
+
112
+ if idx1(1) == 1
113
+ constraint(idx, :) = [idx1(2) idx2(2)];
114
+ else
115
+ constraint(idx, :) = [idx2(2) idx1(2)];
116
+ end
117
+ idx = idx + 1;
118
+ end
119
+ end
120
+
121
+ end
Interface/align_fp/align_fp.m ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function [newBox, order, rBoundary] = align_fp(boundary, rBox, rType, rEdge, fp, threshold, drawResult)
2
+ % align the neighboring rooms first and then align with the boundary
3
+
4
+ if nargin < 7
5
+ drawResult =false;
6
+ end
7
+
8
+ % pre-processing:
9
+ % move the edge relation w.r.t. living room to the end
10
+ livingIdx = find(rType==0);
11
+ idx = rEdge(:,1) == livingIdx-1 | rEdge(:,2) == livingIdx-1;
12
+ % a = rEdge(~idx, :);
13
+ % b = rEdge(idx, :);
14
+ % rEdge = [a; b];
15
+ rEdge = rEdge(~idx, :);
16
+ entranceBox = get_entrance_space(boundary(1:2, 1:2), boundary(1,3), threshold);
17
+
18
+ if drawResult
19
+ clf
20
+ subplot(2,2,1)
21
+ plot_fp(rBox, boundary, rType, entranceBox);
22
+ title('original');
23
+ end
24
+
25
+ %% option #1: use greedy method: align with boundary first and then neighbor
26
+ % 1. align with boundary after the neighbors have been aligned
27
+ [~, newBox, updated] = align_with_boundary(rBox, boundary, threshold, rType);
28
+
29
+ if drawResult
30
+ subplot(2,2,2)
31
+ plot_fp(newBox, boundary, rType, entranceBox);
32
+ title('Align with boundary');
33
+ end
34
+
35
+
36
+ % 2. for each adjacent pair of room,
37
+ [~, newBox, ~] = align_neighbor(newBox, rEdge, updated, threshold+6);
38
+ if drawResult
39
+ subplot(2,2,3)
40
+ plot_fp(newBox, boundary, rType, entranceBox);
41
+ title('Align with neighbors');
42
+ end
43
+
44
+ % 3. regularize fp, include crop using boundary, gap filling
45
+ [newBox, order] = regularize_fp(newBox, boundary, rType);
46
+
47
+ % 4. generate the room polygons
48
+ [newBox, rBoundary] = get_room_boundary(newBox, boundary, order);
49
+
50
+ if drawResult
51
+ subplot(2,2,4)
52
+ plot_fp(newBox(order,:), boundary, rType(order), entranceBox);
53
+ title('Regularize fp');
54
+ end
55
+
56
+ % %% option #2: use optimization to align neighbors, and then align the boundary
57
+ % % 1. get the constraint from the adjacent rooms, and optimize
58
+ % %[constraint1, ~, ~] = align_with_boundary(rBox, boundary, threshold, rNode);
59
+ % [constraint2, ~, ~] = align_neighbor(rBox, rEdge, [], threshold+2);
60
+ % newBox = optimize_fp(rBox, [], constraint2);
61
+ % if drawResult
62
+ % subplot(3,4,6)
63
+ % plot_fp(newBox, boundary, rNode, entranceBox);
64
+ % title('Optimize the neighboring');
65
+ % end
66
+ %
67
+ % % 2. align with boundary after the neighbors have been aligned
68
+ % [constraint1, newBox2, ~] = align_with_boundary(newBox, boundary, threshold, rNode);
69
+ % if drawResult
70
+ % subplot(3,4,7)
71
+ % plot_fp(newBox2, boundary, rNode, entranceBox);
72
+ % title('Align with boundary w/o optimization');
73
+ % end
74
+ %
75
+ % % 3. regularize fp, include crop using boundary, gap filling
76
+ % [newBox2, order] = regularize_fp(newBox2, boundary, rNode);
77
+ % if drawResult
78
+ % subplot(3,4,8)
79
+ % plot_fp(newBox2(order,:), boundary, rNode(order,:), entranceBox);
80
+ % title('Regularize fp');
81
+ % end
82
+ %
83
+ %
84
+ %
85
+ % newBox = optimize_fp(newBox, constraint1, constraint2);
86
+ % if drawResult
87
+ % subplot(3,4,11)
88
+ % plot_fp(newBox, boundary, rNode, entranceBox);
89
+ % title('Align with boundary with optimization');
90
+ % end
91
+ %
92
+ % % 3. regularize fp, include crop using boundary, gap filling
93
+ % [newBox, order] = regularize_fp(newBox, boundary, rNode);
94
+ % if drawResult
95
+ % subplot(3,4,12)
96
+ % plot_fp(newBox(order,:), boundary, rNode(order,:), entranceBox);
97
+ % title('Regularize fp');
98
+ % if ~isempty(figName)
99
+ % saveas(gcf, figName);
100
+ % end
101
+ % end
102
+ %
103
+
104
+
105
+
106
+ %%
107
+ end
108
+
Interface/align_fp/align_neighbor.m ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function [constraint, box, updated] = align_neighbor(box, rEdge, updated, threshold)
2
+
3
+ if isempty(updated)
4
+ updated = false(size(box));
5
+ end
6
+
7
+ tempBox = box;
8
+ constraint = zeros(size(rEdge, 1)*3, 2);
9
+ iBegin = 1;
10
+ checked = false(size(rEdge, 1), 1);
11
+ updatedCount = get_updated_count(updated, rEdge);
12
+ for i = 1:size(rEdge, 1)
13
+ I = find(~checked);
14
+ [~, t] = maxk(updatedCount(I), 1);
15
+ checked(I(t)) = true;
16
+ idx = rEdge(I(t),1:2)+1;
17
+ [b, c] = align_adjacent_room3(box(idx, :), tempBox(idx, :), updated(idx,:), rEdge(I(t),3), threshold);
18
+ for j = 1:length(idx)
19
+
20
+ updated(idx(j), c(:,j)) = true;
21
+
22
+ c(:, j) = (c(:,j)-1)*size(box,1) + double(idx(j));
23
+
24
+ if b(j, 1) == b(j, 3)
25
+ b(j, [1 3]) = box(idx(j), [1 3]);
26
+ updated(idx(j), c(:,j)) = false;
27
+ end
28
+ if b(j, 2) == b(j, 4)
29
+ b(j, [2 4]) = box(idx(j), [2 4]);
30
+ updated(idx(j), c(:,j)) = false;
31
+ end
32
+
33
+ end
34
+ box(idx, :) = b;
35
+
36
+
37
+ cNum = size(c, 1);
38
+
39
+ constraint(iBegin:iBegin+cNum-1, :) = c;
40
+ iBegin = iBegin+cNum;
41
+
42
+ updatedCount = get_updated_count(updated, rEdge);
43
+ end
44
+ constraint = constraint(1:iBegin-1, :);
45
+
46
+ function updatedCount = get_updated_count(updated, rEdge)
47
+ updatedCount = zeros(size(rEdge, 1), 1);
48
+ for k = 1:size(rEdge, 1)
49
+ index = rEdge(k,1:2)+1;
50
+ updatedCount(k) = sum(sum(updated(index,:)));
51
+ end
52
+ end
53
+ end
Interface/align_fp/align_with_boundary.m ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function [constraint, box, updated] = align_with_boundary(box, boundary, threshold, rType)
2
+ tempBox = box;
3
+ updated = false(size(box));
4
+ closedSeg = zeros(size(box));
5
+ distSeg = zeros(size(box));
6
+ for i = 1:length(box)
7
+ [closedSeg(i,:), distSeg(i,:)] = find_close_seg(box(i,:), boundary);
8
+ end
9
+
10
+
11
+ box(distSeg <= threshold) = closedSeg(distSeg <= threshold);
12
+ updated(distSeg <= threshold) = true;
13
+ idx = find(distSeg <= threshold);
14
+ constraint = [idx closedSeg(idx)];
15
+
16
+
17
+ % check if any room box blocks the door
18
+ entranceBox = get_entrance_space(boundary(1:2, 1:2), boundary(1,3), threshold);
19
+ entrancePoly = polyshape(entranceBox([1 1 3 3]), entranceBox([2 4 4 2]));
20
+ for i = 1:length(box)
21
+ if rType(i) ~= 10 && rType(i) ~= 0
22
+ roomPoly = polyshape(box(i, [1 1 3 3]), box(i, [2 4 4 2]));
23
+ if overlaps(entrancePoly, roomPoly)
24
+ box(i,:) = shrink_box(roomPoly, entrancePoly, boundary(1,3));
25
+ updated(i, box(i,:)==tempBox(i,:)) = false;
26
+ updated(i, box(i,:)~=tempBox(i,:)) = true;
27
+ end
28
+ end
29
+ end
Interface/align_fp/find_close_seg.m ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function [closedSeg, distSeg, idx] = find_close_seg(box, boundary)
2
+
3
+ % need to carefully select the closed wall seg for each box
4
+ % cannot introduce a hole inside the boundary
5
+
6
+ isNew = boundary(:,4);
7
+ boundary = double(boundary(~isNew, :));
8
+
9
+ % get the ordered horizontal and vertical segments on the boundary
10
+ bSeg = [boundary(:, 1:2), boundary([2:end 1], 1:2), boundary(:,3)];
11
+ vSeg = bSeg(mod(boundary(:,3), 2)==1, :);
12
+ vSeg(vSeg(:,5)==3, [2 4]) = vSeg(vSeg(:,5)==3, [4 2]);
13
+ [~, I] = sort(vSeg(:,1));
14
+ vSeg = vSeg(I,:);
15
+
16
+ hSeg = bSeg(mod(boundary(:,3), 2)==0, :);
17
+ hSeg(hSeg(:,5)==2, [1 3]) = hSeg(hSeg(:,5)==2, [3 1]);
18
+ [~, I] = sort(hSeg(:,2));
19
+ hSeg = hSeg(I,:);
20
+
21
+ closedSeg = ones(1,4)*256;
22
+ distSeg = ones(1,4)*256;
23
+ idx = zeros(1, 4);
24
+
25
+ % check vertial seg
26
+ for i = 1:size(vSeg,1)
27
+ seg = vSeg(i, :);
28
+ vdist = 0;
29
+ if seg(4) <= box(2)
30
+ vdist = box(2) - seg(4);
31
+ elseif seg(2) >= box(4)
32
+ vdist = seg(2) - box(4);
33
+ end
34
+
35
+ hdist = box([1 3]) - seg(1);
36
+ dist1 = norm(double([hdist(1), vdist]));
37
+ dist3 = norm(double([hdist(2), vdist]));
38
+
39
+ if dist1 < distSeg(1) && dist1 <= dist3 && hdist(1) > 0
40
+ distSeg(1) = dist1;
41
+ idx(1) = i;
42
+ closedSeg(1) = seg(1);
43
+ elseif dist3 < distSeg(3) && hdist(2) < 0
44
+ distSeg(3) = dist3;
45
+ idx(3) = i;
46
+ closedSeg(3) = seg(3);
47
+ end
48
+ end
49
+
50
+ % check horizontal seg
51
+ for i = 1:size(hSeg,1)
52
+
53
+ seg = hSeg(i, :);
54
+ hdist = 0;
55
+ if seg(3) <= box(1)
56
+ hdist = box(1) - seg(3);
57
+ elseif seg(1) >= box(3)
58
+ hdist = seg(1) - box(3);
59
+ end
60
+
61
+ vdist = box([2 4]) - seg(2);
62
+ dist2 = norm(double([vdist(1), hdist]));
63
+ dist4 = norm(double([vdist(2), hdist]));
64
+
65
+ if dist2 <= dist4 && dist2 < distSeg(2) && vdist(1) > 0
66
+ distSeg(2) = dist2;
67
+ idx(2) = i;
68
+ closedSeg(2) = seg(2);
69
+ elseif dist4 < distSeg(4) && vdist(2) < 0
70
+ distSeg(4) = dist4;
71
+ idx(4) = i;
72
+ closedSeg(4) = seg(4);
73
+ end
74
+ end