List of commits:
Subject Hash Author Date (UTC)
done single sample cee46d309e9bb91ac4185b0e1b74deddefbc8553 Thai Thien 2020-09-06 15:24:39
a ec2103c6617ad84375e5a7a0f3cde3b32ab012a0 Thai Thien 2020-08-23 15:39:51
pred_count d9168903486d7a88c0763a8e93b18d1ed89d2d40 Thai Thien 2020-08-23 15:37:02
density_map_count = gt_density.detach().sum() 015c7ab3a1734c6002065f775f90870b6c5bdbd5 Thai Thien 2020-08-23 15:35:31
no more eval, only one in function 316b330c481224bb4264ddebb3dda2e317c32ac1 Thai Thien 2020-08-23 15:34:21
None type eval 15a12c6dd1a6f828f5e852faecaf2a812dfddce8 Thai Thien 2020-08-23 15:30:17
run experiment on shb truncate 4 3faae2b49ed074fdb96fc20e916fee9eeac4f92f Thai Thien 2020-08-23 15:20:23
evaluatuion shb b80eac051649c36ea1631cc4701e6d1d587d7887 Thai Thien 2020-08-23 09:26:45
fix evaluation shb 51cbe92724973f64cb046f7f49fb1976400827e4 Thai Thien 2020-08-23 09:18:35
typo 1cba17e02cc79ee73c4ad5c9f1faab4913f92b01 Thai Thien 2020-08-23 08:53:21
fix file, mae, mse 245396d814f5d83dff1fd1ecc9fcd403be1805cb Thai Thien 2020-08-23 08:52:16
file name strage stuff caeb9f9608e91cf6a1323d9ae9f4fb215c4dd6ea Thai Thien 2020-08-23 08:44:54
TypeError: can only concatenate str (not "list") to str e8aebcfb782966c11c3ca116b5a9cc254021a73d Thai Thien 2020-08-23 08:41:02
key error 5732100d6aca8e3fea6a4d25270edefbc8148a2a Thai Thien 2020-08-23 08:39:09
fix target fdbda2c6923dd164560448a445cd64ff413fc804 Thai Thien 2020-08-23 08:37:48
test path 06d268f873e6ceea93a8e8741d819a03b324cedb Thai Thien 2020-08-23 08:27:38
a 1d73d926894edbc600db678316b9b24a583c4cb8 Thai Thien 2020-08-23 08:25:58
test set bb1e40fc7806c8bef5e94fbaa54ac9af3b599041 Thai Thien 2020-08-23 08:23:30
remove epoch stuff 2cc6434aa298b6da90b4577ce529f971119b86c7 Thai Thien 2020-08-23 07:53:36
evaluation_shb_CompactCNNV7i_t1 28cf202a306b775967c6e466120b019ae1eb6a4d Thai Thien 2020-08-23 07:49:51
Commit cee46d309e9bb91ac4185b0e1b74deddefbc8553 - done single sample
Author: Thai Thien
Author date (UTC): 2020-09-06 15:24
Committer name: Thai Thien
Committer date (UTC): 2020-09-06 15:24
Parent(s): ec2103c6617ad84375e5a7a0f3cde3b32ab012a0
Signer:
Signing key:
Signing status: N
Tree: d966dbeb5adf2bb71fa04adfba1e11864f433159
File Lines added Lines deleted
dataset_script/jhucrowd_density_map.py 100 0
playground/.ipynb_checkpoints/jhucrowd_label-checkpoint.ipynb 255 0
playground/0003.txt 804 0
playground/jhucrowd_label.ipynb 255 0
File dataset_script/jhucrowd_density_map.py added (mode: 100644) (index 0000000..1f75743)
1 import os
2 import pandas as pd
3 import numpy as np
4 import scipy
5 import scipy.spatial
6 import scipy.ndimage
7 from PIL import Image
8 import h5py
9 from visualize_util import save_density_map
10
11 def load_density_label(label_txt_path):
12 """
13
14 :param label_txt_path: path to txt
15 :return: numpy array, p[sample, a] with a is 0 for x and 1 for y
16 """
17 df = pd.read_csv(label_txt_path, sep=" ", header=None)
18 p = df.to_numpy()
19 return p
20
21
22 def gaussian_filter_density(gt):
23 """
24 generate density map from gt
25 :param gt: matrix same shape as image, where annotation label as 1
26 :return:
27 """
28 print(gt.shape)
29 density = np.zeros(gt.shape, dtype=np.float32)
30 gt_count = np.count_nonzero(gt)
31 if gt_count == 0:
32 return density
33
34 pts = np.array(list(zip(np.nonzero(gt)[1], np.nonzero(gt)[0])))
35 leafsize = 2048
36 # build kdtree
37 pts_copy = pts.copy()
38 tree = scipy.spatial.KDTree(pts_copy, leafsize=leafsize)
39 # query kdtree
40 distances, locations = tree.query(pts, k=4)
41
42 print('generate density...')
43 for i, pt in enumerate(pts):
44 pt2d = np.zeros(gt.shape, dtype=np.float32)
45 pt2d[pt[1], pt[0]] = 1.
46 if gt_count > 1:
47 sigma = (distances[i][1] + distances[i][2] + distances[i][3]) * 0.1
48 else:
49 sigma = np.average(np.array(gt.shape)) / 2. / 2. # case: 1 point
50 density += scipy.ndimage.filters.gaussian_filter(pt2d, sigma, mode='constant')
51 print('done.')
52 return density
53
54 def generate_density_map(img_path, label_path, output_path):
55 """
56
57 :param img_path:
58 :param label_path: txt
59 :param output_path
60 :return:
61 """
62
63 gt = load_density_label(label_path)
64 imgfile = Image.open(img_path).convert('RGB')
65 # imgfile = image.load_img(img_path)
66 img = np.asarray(imgfile)
67
68 # empty matrix zero
69 k = np.zeros((img.shape[0], img.shape[1]))
70 for i in range(0, len(gt)):
71 if int(gt[i][1]) < img.shape[0] and int(gt[i][0]) < img.shape[1]:
72 k[int(gt[i][1]), int(gt[i][0])] = 1
73 k = gaussian_filter_density(k)
74 with h5py.File(output_path, 'w') as hf:
75 hf['density'] = k
76 return output_path
77
78
79 def t_single_density_map():
80 img = "/data/jhu_crowd_v2.0/val/images/0003.jpg"
81 label = "/data/jhu_crowd_v2.0/val/gt/0003.txt"
82 out_path = "/data/jhu_crowd_v2.0/val/unittest/0003.txt"
83 out = generate_density_map(img, label, out_path)
84 print(out)
85
86
87 def print_density_map(density_path, density_img_out):
88 gt_file = h5py.File(density_path, 'r')
89 target = np.asarray(gt_file['density'])
90 save_density_map(target, density_img_out)
91 print("done print ", density_img_out)
92
93 if __name__ == "__main__":
94 # t_single_density_map()
95 print_density_map("/data/jhu_crowd_v2.0/val/unittest/0003.h5", "/data/jhu_crowd_v2.0/val/unittest/0003.png")
96
97 # ROOT = "/data/jhu_crowd_v2.0/val"
98 # images_folder = os.path.join(ROOT, "images")
99 # gt_path_folder = os.path.join(ROOT, "gt")
100
File playground/.ipynb_checkpoints/jhucrowd_label-checkpoint.ipynb added (mode: 100644) (index 0000000..5ad7071)
1 {
2 "cells": [
3 {
4 "cell_type": "code",
5 "execution_count": 2,
6 "metadata": {},
7 "outputs": [],
8 "source": [
9 "path = \"0003.txt\""
10 ]
11 },
12 {
13 "cell_type": "code",
14 "execution_count": 1,
15 "metadata": {},
16 "outputs": [
17 {
18 "name": "stdout",
19 "output_type": "stream",
20 "text": [
21 "0003.txt\t jhucrowd_label.ipynb p_if_deformable_bug.py\r\n",
22 "ccnnv2_playground.py p_batch.py\t play_load_perspective_map.py\r\n",
23 "__init__.py\t p_can_adcrowdnet.py\r\n"
24 ]
25 }
26 ],
27 "source": [
28 "!ls"
29 ]
30 },
31 {
32 "cell_type": "code",
33 "execution_count": 3,
34 "metadata": {},
35 "outputs": [],
36 "source": [
37 "import pandas as pd"
38 ]
39 },
40 {
41 "cell_type": "code",
42 "execution_count": 7,
43 "metadata": {},
44 "outputs": [],
45 "source": [
46 "df = pd.read_csv(path, sep=\" \", header=None)"
47 ]
48 },
49 {
50 "cell_type": "code",
51 "execution_count": 9,
52 "metadata": {},
53 "outputs": [
54 {
55 "data": {
56 "text/html": [
57 "<div>\n",
58 "<style scoped>\n",
59 " .dataframe tbody tr th:only-of-type {\n",
60 " vertical-align: middle;\n",
61 " }\n",
62 "\n",
63 " .dataframe tbody tr th {\n",
64 " vertical-align: top;\n",
65 " }\n",
66 "\n",
67 " .dataframe thead th {\n",
68 " text-align: right;\n",
69 " }\n",
70 "</style>\n",
71 "<table border=\"1\" class=\"dataframe\">\n",
72 " <thead>\n",
73 " <tr style=\"text-align: right;\">\n",
74 " <th></th>\n",
75 " <th>0</th>\n",
76 " <th>1</th>\n",
77 " <th>2</th>\n",
78 " <th>3</th>\n",
79 " <th>4</th>\n",
80 " <th>5</th>\n",
81 " </tr>\n",
82 " </thead>\n",
83 " <tbody>\n",
84 " <tr>\n",
85 " <th>0</th>\n",
86 " <td>499</td>\n",
87 " <td>347</td>\n",
88 " <td>6</td>\n",
89 " <td>7</td>\n",
90 " <td>1</td>\n",
91 " <td>0</td>\n",
92 " </tr>\n",
93 " <tr>\n",
94 " <th>1</th>\n",
95 " <td>143</td>\n",
96 " <td>640</td>\n",
97 " <td>8</td>\n",
98 " <td>10</td>\n",
99 " <td>1</td>\n",
100 " <td>0</td>\n",
101 " </tr>\n",
102 " <tr>\n",
103 " <th>2</th>\n",
104 " <td>539</td>\n",
105 " <td>649</td>\n",
106 " <td>8</td>\n",
107 " <td>10</td>\n",
108 " <td>1</td>\n",
109 " <td>0</td>\n",
110 " </tr>\n",
111 " <tr>\n",
112 " <th>3</th>\n",
113 " <td>301</td>\n",
114 " <td>385</td>\n",
115 " <td>6</td>\n",
116 " <td>7</td>\n",
117 " <td>1</td>\n",
118 " <td>0</td>\n",
119 " </tr>\n",
120 " <tr>\n",
121 " <th>4</th>\n",
122 " <td>553</td>\n",
123 " <td>395</td>\n",
124 " <td>6</td>\n",
125 " <td>7</td>\n",
126 " <td>1</td>\n",
127 " <td>0</td>\n",
128 " </tr>\n",
129 " </tbody>\n",
130 "</table>\n",
131 "</div>"
132 ],
133 "text/plain": [
134 " 0 1 2 3 4 5\n",
135 "0 499 347 6 7 1 0\n",
136 "1 143 640 8 10 1 0\n",
137 "2 539 649 8 10 1 0\n",
138 "3 301 385 6 7 1 0\n",
139 "4 553 395 6 7 1 0"
140 ]
141 },
142 "execution_count": 9,
143 "metadata": {},
144 "output_type": "execute_result"
145 }
146 ],
147 "source": [
148 "df.head()"
149 ]
150 },
151 {
152 "cell_type": "code",
153 "execution_count": 11,
154 "metadata": {},
155 "outputs": [],
156 "source": [
157 "p = df.to_numpy()\n"
158 ]
159 },
160 {
161 "cell_type": "code",
162 "execution_count": 12,
163 "metadata": {},
164 "outputs": [
165 {
166 "data": {
167 "text/plain": [
168 "array([[499, 347, 6, 7, 1, 0],\n",
169 " [143, 640, 8, 10, 1, 0],\n",
170 " [539, 649, 8, 10, 1, 0],\n",
171 " ...,\n",
172 " [962, 538, 8, 10, 1, 0],\n",
173 " [337, 399, 6, 7, 1, 0],\n",
174 " [445, 270, 5, 7, 1, 0]])"
175 ]
176 },
177 "execution_count": 12,
178 "metadata": {},
179 "output_type": "execute_result"
180 }
181 ],
182 "source": [
183 "p"
184 ]
185 },
186 {
187 "cell_type": "code",
188 "execution_count": 13,
189 "metadata": {},
190 "outputs": [
191 {
192 "data": {
193 "text/plain": [
194 "347"
195 ]
196 },
197 "execution_count": 13,
198 "metadata": {},
199 "output_type": "execute_result"
200 }
201 ],
202 "source": [
203 "p[0,1]"
204 ]
205 },
206 {
207 "cell_type": "code",
208 "execution_count": 14,
209 "metadata": {},
210 "outputs": [
211 {
212 "data": {
213 "text/plain": [
214 "347"
215 ]
216 },
217 "execution_count": 14,
218 "metadata": {},
219 "output_type": "execute_result"
220 }
221 ],
222 "source": [
223 "p[0][1]"
224 ]
225 },
226 {
227 "cell_type": "code",
228 "execution_count": null,
229 "metadata": {},
230 "outputs": [],
231 "source": []
232 }
233 ],
234 "metadata": {
235 "kernelspec": {
236 "display_name": "Python 3",
237 "language": "python",
238 "name": "python3"
239 },
240 "language_info": {
241 "codemirror_mode": {
242 "name": "ipython",
243 "version": 3
244 },
245 "file_extension": ".py",
246 "mimetype": "text/x-python",
247 "name": "python",
248 "nbconvert_exporter": "python",
249 "pygments_lexer": "ipython3",
250 "version": "3.8.1"
251 }
252 },
253 "nbformat": 4,
254 "nbformat_minor": 4
255 }
File playground/0003.txt added (mode: 100644) (index 0000000..12ef738)
1 499 347 6 7 1 0
2 143 640 8 10 1 0
3 539 649 8 10 1 0
4 301 385 6 7 1 0
5 553 395 6 7 1 0
6 874 309 5 7 1 0
7 202 592 8 10 1 0
8 176 554 8 10 1 0
9 205 643 8 10 1 0
10 494 380 6 7 1 0
11 704 331 6 7 1 0
12 817 303 5 7 1 0
13 689 475 6 7 1 0
14 182 557 8 10 1 0
15 318 665 8 10 1 0
16 841 387 6 7 1 0
17 220 424 6 7 1 0
18 149 553 8 10 1 0
19 278 459 6 7 1 0
20 395 692 8 10 1 0
21 289 535 8 10 1 0
22 279 429 6 7 1 0
23 538 302 5 7 1 0
24 115 677 8 10 1 0
25 694 300 5 7 1 0
26 534 268 5 7 1 0
27 756 707 8 10 1 0
28 241 413 6 7 1 0
29 2 671 8 10 1 0
30 980 647 8 10 2 0
31 216 437 6 7 1 0
32 412 292 5 7 1 0
33 491 421 6 7 1 0
34 126 494 8 10 1 0
35 11 594 8 10 1 0
36 268 273 5 7 1 0
37 434 276 5 7 1 0
38 733 304 5 7 1 0
39 737 393 6 7 1 0
40 795 509 8 10 1 0
41 228 440 6 7 1 0
42 502 656 8 10 1 0
43 418 324 6 7 1 0
44 458 626 8 10 1 0
45 546 332 6 7 1 0
46 938 372 6 7 1 0
47 844 617 8 10 1 0
48 690 416 6 7 1 0
49 981 663 8 10 1 0
50 942 423 6 7 1 0
51 767 368 6 7 1 0
52 264 524 8 10 1 0
53 71 649 8 10 1 0
54 431 376 6 7 1 0
55 899 477 6 7 1 0
56 30 379 5 7 1 0
57 247 274 5 7 1 0
58 700 347 6 7 1 0
59 489 378 6 7 1 0
60 651 335 6 7 1 0
61 20 224 5 7 1 0
62 323 408 6 7 1 0
63 929 286 5 7 1 0
64 518 199 5 7 1 0
65 735 353 6 7 1 0
66 308 284 5 7 1 0
67 530 272 5 7 1 0
68 465 591 8 10 1 0
69 360 385 6 7 1 0
70 97 646 8 10 1 0
71 655 583 8 10 1 0
72 937 301 5 7 1 0
73 859 279 5 7 1 0
74 473 609 8 10 1 0
75 690 194 3 2 1 0
76 775 552 8 10 1 0
77 356 408 6 7 1 0
78 804 593 8 10 1 0
79 990 627 8 10 2 0
80 647 709 8 10 1 0
81 354 328 6 7 1 0
82 828 313 5 7 1 0
83 420 656 8 10 1 0
84 74 569 8 10 1 0
85 848 463 6 7 1 0
86 626 194 3 2 1 0
87 386 363 6 7 1 0
88 327 646 8 10 1 0
89 684 312 5 7 1 0
90 860 389 6 7 1 0
91 829 550 8 10 1 0
92 415 714 8 10 1 0
93 824 389 6 7 1 0
94 638 286 5 7 1 0
95 477 692 8 10 1 0
96 452 651 8 10 1 0
97 49 292 5 7 1 0
98 779 706 8 10 1 0
99 597 305 5 7 1 0
100 790 384 6 7 1 0
101 913 293 5 7 1 0
102 362 273 5 7 1 0
103 567 271 5 7 1 0
104 313 407 6 7 1 0
105 527 679 8 10 1 0
106 511 347 6 7 1 0
107 514 267 5 7 1 0
108 783 286 5 7 1 0
109 136 563 8 10 1 0
110 599 704 8 10 1 0
111 601 193 3 2 1 0
112 503 328 6 7 1 0
113 802 717 8 10 1 0
114 984 544 8 10 1 0
115 408 266 5 7 1 0
116 433 303 5 7 1 0
117 43 256 5 7 1 0
118 710 384 6 7 1 0
119 976 380 6 7 1 0
120 411 419 6 7 1 0
121 307 619 8 10 1 0
122 509 299 5 7 1 0
123 165 639 8 10 1 0
124 615 668 8 10 1 0
125 491 406 6 7 1 0
126 832 594 8 10 1 0
127 678 317 6 7 1 0
128 392 654 8 10 1 0
129 876 299 5 7 1 0
130 803 635 8 10 1 0
131 944 602 8 10 1 0
132 163 449 6 7 1 0
133 466 377 6 7 1 0
134 918 366 6 7 1 0
135 863 368 6 7 1 0
136 922 293 5 7 1 0
137 757 273 5 7 1 0
138 975 341 6 7 1 0
139 445 288 5 7 1 0
140 280 466 6 7 1 0
141 858 306 5 7 1 0
142 39 414 6 7 1 0
143 505 395 6 7 1 0
144 905 282 5 7 1 0
145 252 533 8 10 1 0
146 286 650 8 10 1 0
147 749 289 5 7 1 0
148 719 423 6 7 1 0
149 174 548 8 10 1 0
150 710 682 8 10 1 0
151 865 328 6 7 1 0
152 296 427 6 7 1 0
153 764 317 6 7 1 0
154 235 526 8 10 1 0
155 435 641 8 10 1 0
156 143 506 8 10 1 0
157 557 338 6 7 1 0
158 750 299 5 7 1 0
159 692 446 6 7 1 0
160 522 309 5 7 1 0
161 638 374 6 7 1 0
162 506 573 8 10 1 0
163 681 394 6 7 1 0
164 181 473 6 7 1 0
165 356 420 6 7 1 0
166 333 387 6 7 1 0
167 725 300 5 7 1 0
168 339 348 6 7 1 0
169 84 672 8 10 1 0
170 355 343 6 7 1 0
171 622 617 8 10 1 0
172 983 613 8 10 1 0
173 299 405 6 7 1 0
174 17 264 5 7 1 0
175 866 541 8 10 1 0
176 820 469 6 7 1 0
177 357 681 8 10 1 0
178 647 291 5 7 1 0
179 694 275 5 7 1 0
180 144 715 8 10 1 0
181 192 508 8 10 1 0
182 805 639 8 10 1 0
183 293 386 6 7 1 0
184 683 195 3 2 1 0
185 711 329 6 7 1 0
186 359 515 8 10 1 0
187 441 477 6 7 1 0
188 490 411 6 7 1 0
189 372 469 6 7 1 0
190 34 261 5 7 1 0
191 722 391 6 7 1 0
192 449 387 6 7 1 0
193 621 193 3 2 1 0
194 892 394 6 7 1 0
195 50 692 8 10 1 0
196 444 344 6 7 1 0
197 991 612 8 10 1 0
198 853 284 5 7 1 0
199 250 620 8 10 1 0
200 284 572 8 10 1 0
201 772 302 5 7 1 0
202 536 334 6 7 1 0
203 866 402 6 7 1 0
204 87 627 8 10 1 0
205 42 417 6 7 1 0
206 413 326 6 7 1 0
207 294 410 6 7 1 0
208 892 314 5 7 1 0
209 521 540 8 10 1 0
210 332 473 6 7 1 0
211 627 207 5 7 1 0
212 45 321 5 7 1 0
213 794 368 6 7 1 0
214 901 293 5 7 1 0
215 705 353 6 7 1 0
216 430 197 3 2 1 0
217 42 578 8 10 1 0
218 85 586 8 10 1 0
219 644 308 5 7 1 0
220 636 567 8 10 1 0
221 361 427 6 7 1 0
222 825 704 8 10 2 0
223 505 491 8 10 1 0
224 975 603 8 10 2 0
225 867 703 8 10 1 0
226 274 413 6 7 1 0
227 22 286 5 7 1 0
228 638 194 3 2 1 0
229 804 301 5 7 1 0
230 308 411 6 7 1 0
231 532 667 8 10 1 0
232 383 647 8 10 1 0
233 495 530 8 10 1 0
234 365 400 6 7 1 0
235 580 428 6 7 1 0
236 211 555 8 10 1 0
237 858 502 8 10 1 0
238 933 353 6 7 1 0
239 274 629 8 10 1 0
240 140 578 8 10 1 0
241 550 296 5 7 1 0
242 484 422 6 7 1 0
243 331 516 8 10 1 0
244 298 273 5 7 1 0
245 965 428 6 7 1 0
246 156 571 8 10 1 0
247 907 594 8 10 1 0
248 381 414 6 7 1 0
249 500 323 6 7 1 0
250 814 703 8 10 1 0
251 921 412 6 7 1 0
252 795 456 6 7 1 0
253 794 631 8 10 1 0
254 612 405 6 7 1 0
255 121 568 8 10 1 0
256 975 679 8 10 2 0
257 530 327 6 7 1 0
258 439 415 6 7 1 0
259 116 627 8 10 1 0
260 619 579 8 10 1 0
261 734 312 5 7 1 0
262 369 571 8 10 1 0
263 475 654 8 10 1 0
264 114 714 8 10 1 0
265 76 405 6 7 1 0
266 341 273 5 7 1 0
267 474 490 7 9 1 0
268 574 270 5 7 1 0
269 578 383 6 7 1 0
270 572 739 8 10 1 0
271 479 238 5 7 1 0
272 553 362 6 7 1 0
273 843 320 6 7 1 0
274 991 420 6 7 1 0
275 464 642 8 10 1 0
276 542 358 6 7 1 0
277 418 312 5 7 1 0
278 280 583 8 10 1 0
279 718 268 5 7 1 0
280 479 598 8 10 1 0
281 376 286 5 7 1 0
282 159 578 8 10 1 0
283 867 318 6 7 1 0
284 589 368 6 7 1 0
285 700 700 8 10 1 0
286 420 390 6 7 1 0
287 568 197 3 2 1 0
288 366 356 6 7 1 0
289 383 529 8 10 1 0
290 868 295 5 7 1 0
291 346 461 6 7 1 0
292 717 345 6 7 1 0
293 427 426 6 7 1 0
294 407 657 8 10 1 0
295 185 511 8 10 1 0
296 829 422 6 7 1 0
297 951 386 6 7 1 0
298 766 466 6 7 1 0
299 776 429 6 7 1 0
300 671 294 5 7 1 0
301 579 617 8 10 1 0
302 980 326 5 7 1 0
303 480 382 6 7 1 0
304 668 196 3 2 1 0
305 469 652 8 10 1 0
306 964 402 6 7 1 0
307 383 330 6 7 1 0
308 770 286 5 7 1 0
309 894 436 6 7 1 0
310 116 571 8 10 1 0
311 914 300 5 7 1 0
312 542 271 5 7 1 0
313 354 298 5 7 1 0
314 842 451 6 7 1 0
315 126 646 8 10 1 0
316 542 201 5 7 1 0
317 931 553 8 10 1 0
318 714 446 6 7 1 0
319 872 386 6 7 1 0
320 766 297 5 7 1 0
321 380 264 5 7 1 0
322 973 602 8 10 2 0
323 913 319 6 7 1 0
324 474 473 6 7 1 0
325 789 474 6 7 1 0
326 754 368 6 7 1 0
327 741 338 6 7 1 0
328 768 275 5 7 1 0
329 382 456 6 7 1 0
330 43 675 8 10 1 0
331 318 379 6 7 1 0
332 710 313 5 7 1 0
333 500 200 5 7 1 0
334 348 382 6 7 1 0
335 449 267 5 7 1 0
336 594 576 8 10 1 0
337 55 582 8 10 1 0
338 488 518 8 10 1 0
339 415 641 8 10 1 0
340 424 622 8 10 1 0
341 515 690 8 10 1 0
342 851 419 6 7 1 0
343 567 457 6 7 1 0
344 893 596 8 10 1 0
345 382 543 8 10 1 0
346 321 516 8 10 1 0
347 274 658 8 10 1 0
348 329 352 6 7 1 0
349 382 506 8 10 1 0
350 529 404 6 7 1 0
351 978 718 8 10 1 0
352 267 462 6 7 1 0
353 676 267 5 7 1 0
354 429 417 6 7 1 0
355 527 197 3 2 1 0
356 734 340 6 7 1 0
357 849 379 6 7 1 0
358 274 640 8 10 1 0
359 172 500 8 10 1 0
360 321 387 6 7 1 0
361 406 375 6 7 1 0
362 527 279 5 7 1 0
363 445 392 6 7 1 0
364 873 606 8 10 1 0
365 887 304 5 7 1 0
366 921 299 5 7 1 0
367 823 704 8 10 2 0
368 931 602 8 10 1 0
369 126 683 8 10 1 0
370 595 512 8 10 1 0
371 699 315 6 7 1 0
372 928 441 6 7 1 0
373 814 306 5 7 1 0
374 564 393 6 7 1 0
375 560 550 8 10 1 0
376 558 683 8 10 1 0
377 888 472 6 7 1 0
378 209 635 8 10 1 0
379 340 375 6 7 1 0
380 872 363 6 7 1 0
381 541 317 6 7 1 0
382 199 409 6 7 1 0
383 698 192 3 2 1 0
384 936 414 6 7 1 0
385 614 271 5 7 1 0
386 536 196 3 2 1 0
387 458 691 8 10 1 0
388 586 385 6 7 1 0
389 898 296 5 7 1 0
390 117 638 8 10 1 0
391 707 398 6 7 1 0
392 639 333 6 7 1 0
393 327 284 5 7 1 0
394 846 299 5 7 1 0
395 856 378 6 7 1 0
396 856 321 6 7 1 0
397 890 321 6 7 1 0
398 915 350 6 7 1 0
399 31 582 8 10 1 0
400 637 385 6 7 1 0
401 506 367 6 7 1 0
402 668 711 8 10 1 0
403 519 352 6 7 1 0
404 555 482 6 7 1 0
405 549 574 8 10 1 0
406 272 470 6 7 1 0
407 327 271 5 7 1 0
408 521 328 6 7 1 0
409 730 278 5 7 1 0
410 569 366 6 7 1 0
411 844 353 6 7 1 0
412 982 646 8 10 2 0
413 236 518 8 10 1 0
414 780 403 6 7 1 0
415 559 199 5 7 1 0
416 802 736 8 10 1 0
417 435 382 6 7 1 0
418 905 312 5 7 1 0
419 304 700 8 10 1 0
420 921 382 6 7 1 0
421 420 267 5 7 1 0
422 551 715 8 10 1 0
423 376 579 8 10 1 0
424 129 563 8 10 1 0
425 792 284 5 7 1 0
426 347 646 8 10 1 0
427 747 195 3 2 1 0
428 694 598 8 10 1 0
429 797 542 8 10 1 0
430 634 201 5 7 1 0
431 604 307 5 7 1 0
432 850 278 5 7 1 0
433 766 512 8 10 1 0
434 412 618 8 10 1 0
435 325 339 6 7 1 0
436 259 403 6 7 1 0
437 194 540 8 10 1 0
438 340 388 6 7 1 0
439 699 296 5 7 1 0
440 876 346 6 7 1 0
441 708 269 5 7 1 0
442 626 291 5 7 1 0
443 790 315 6 7 1 0
444 731 573 8 10 1 0
445 366 265 5 7 1 0
446 557 266 5 7 1 0
447 506 271 5 7 1 0
448 900 630 8 10 1 0
449 534 382 6 7 1 0
450 240 457 6 7 1 0
451 441 284 5 7 1 0
452 918 327 6 7 1 0
453 726 270 5 7 1 0
454 797 636 8 10 1 0
455 261 581 8 10 1 0
456 909 316 6 7 1 0
457 246 640 8 10 1 0
458 159 527 8 10 1 0
459 760 388 6 7 1 0
460 60 579 8 10 1 0
461 993 704 8 10 1 0
462 764 325 6 7 1 0
463 387 469 6 7 1 0
464 287 692 8 10 1 0
465 856 413 6 7 1 0
466 471 394 6 7 1 0
467 85 646 8 10 1 0
468 650 366 6 7 1 0
469 564 621 8 10 1 0
470 737 322 6 7 1 0
471 427 554 8 10 1 0
472 458 656 8 10 1 0
473 404 343 6 7 1 0
474 374 307 5 7 1 0
475 838 346 6 7 1 0
476 398 377 6 7 1 0
477 634 354 6 7 1 0
478 595 190 3 2 1 0
479 197 650 8 10 1 0
480 210 684 8 10 1 0
481 290 457 6 7 1 0
482 709 306 5 7 1 0
483 718 279 5 7 1 0
484 716 309 5 7 1 0
485 898 390 6 7 1 0
486 587 658 8 10 1 0
487 474 433 6 7 1 0
488 898 362 6 7 1 0
489 577 402 6 7 1 0
490 400 323 6 7 1 0
491 553 264 5 7 1 0
492 606 529 8 10 1 0
493 939 728 8 10 1 0
494 891 407 6 7 1 0
495 407 397 6 7 1 0
496 725 369 6 7 1 0
497 369 270 5 7 1 0
498 500 425 6 7 1 0
499 444 599 8 10 1 0
500 261 273 5 7 1 0
501 329 294 5 7 1 0
502 352 653 8 10 1 0
503 387 288 5 7 1 0
504 722 684 8 10 1 0
505 187 714 8 10 1 0
506 565 445 6 7 1 0
507 510 412 6 7 1 0
508 762 347 6 7 1 0
509 520 271 5 7 1 0
510 387 264 5 7 1 0
511 408 281 5 7 1 0
512 262 561 8 10 1 0
513 685 284 5 7 1 0
514 878 615 8 10 1 0
515 831 327 6 7 1 0
516 52 270 5 7 1 0
517 719 585 8 10 1 0
518 782 302 5 7 1 0
519 283 632 8 10 1 0
520 930 319 6 7 1 0
521 317 484 7 8 1 0
522 961 634 8 10 1 0
523 176 408 6 7 1 0
524 639 326 6 7 1 0
525 682 299 5 7 1 0
526 769 337 6 7 1 0
527 29 331 5 7 1 0
528 906 264 5 7 1 0
529 843 278 5 7 1 0
530 308 340 6 7 1 0
531 714 193 3 2 1 0
532 869 459 6 7 1 0
533 589 192 3 2 1 0
534 994 412 6 7 1 0
535 723 350 6 7 1 0
536 284 293 5 7 1 0
537 35 686 8 10 1 0
538 981 340 6 7 1 0
539 676 614 8 10 1 0
540 379 276 5 7 1 0
541 334 422 6 7 1 0
542 899 509 8 10 1 0
543 340 313 5 7 1 0
544 724 194 3 2 1 0
545 782 440 6 7 1 0
546 349 284 5 7 1 0
547 523 348 6 7 1 0
548 599 275 5 7 1 0
549 588 279 5 7 1 0
550 436 688 8 10 1 0
551 494 551 8 10 1 0
552 326 307 5 7 1 0
553 624 508 8 10 1 0
554 450 416 6 7 1 0
555 546 279 5 7 1 0
556 690 286 5 7 1 0
557 980 375 6 7 1 0
558 937 590 8 10 1 0
559 551 745 8 10 1 0
560 281 453 6 7 1 0
561 916 288 5 7 1 0
562 432 297 5 7 1 0
563 272 524 8 10 1 0
564 293 519 8 10 1 0
565 364 616 8 10 1 0
566 292 273 5 7 1 0
567 990 626 8 10 2 0
568 640 314 5 7 1 0
569 732 197 3 2 1 0
570 741 344 6 7 1 0
571 77 580 8 10 1 0
572 457 375 6 7 1 0
573 720 195 3 2 1 0
574 390 358 6 7 1 0
575 193 564 8 10 1 0
576 747 339 6 7 1 0
577 908 564 8 10 1 0
578 285 565 8 10 1 0
579 153 684 8 10 1 0
580 488 701 8 10 1 0
581 335 267 5 7 1 0
582 393 394 6 7 1 0
583 392 285 5 7 1 0
584 378 388 6 7 1 0
585 865 356 6 7 1 0
586 73 311 5 7 1 0
587 548 270 5 7 1 0
588 89 662 8 10 1 0
589 438 428 6 7 1 0
590 693 330 6 7 1 0
591 937 661 8 10 1 0
592 518 748 8 10 1 0
593 941 344 6 7 1 0
594 17 382 5 7 1 0
595 879 725 8 10 1 0
596 386 657 8 10 1 0
597 319 324 6 7 1 0
598 426 281 5 7 1 0
599 476 384 6 7 1 0
600 18 606 8 10 1 0
601 444 197 3 2 1 0
602 604 287 5 7 1 0
603 359 475 6 7 1 0
604 315 565 8 10 1 0
605 932 432 6 7 1 0
606 165 532 8 10 1 0
607 941 678 8 10 1 0
608 337 749 8 10 1 0
609 504 603 8 10 1 0
610 146 476 6 7 1 0
611 882 401 6 7 1 0
612 811 704 8 10 1 0
613 339 406 6 7 1 0
614 35 229 5 7 1 0
615 780 537 8 10 1 0
616 278 408 6 7 1 0
617 976 401 6 7 1 0
618 395 276 5 7 1 0
619 771 315 6 7 1 0
620 557 459 6 7 1 0
621 534 283 5 7 1 0
622 742 202 5 7 1 0
623 836 722 8 10 1 0
624 726 334 6 7 1 0
625 683 273 5 7 1 0
626 752 394 6 7 1 0
627 435 699 8 10 1 0
628 752 313 5 7 1 0
629 747 418 6 7 1 0
630 453 503 8 10 1 0
631 865 289 5 7 1 0
632 335 308 5 7 1 0
633 323 376 6 7 1 0
634 401 191 3 3 1 0
635 290 312 5 7 1 0
636 580 193 3 2 1 0
637 334 483 6 7 1 0
638 413 353 6 7 1 0
639 742 362 6 7 1 0
640 103 611 8 10 1 0
641 727 197 3 2 1 0
642 490 347 6 7 1 0
643 516 299 5 7 1 0
644 725 310 5 7 1 0
645 569 554 8 10 1 0
646 786 526 8 10 1 0
647 915 718 8 10 1 0
648 348 393 6 7 1 0
649 866 360 6 7 1 0
650 687 271 5 7 1 0
651 581 748 8 10 1 0
652 34 416 6 7 1 0
653 331 308 5 7 1 0
654 654 532 8 10 1 0
655 414 383 6 7 1 0
656 724 323 6 7 1 0
657 306 326 6 7 1 0
658 761 286 5 7 1 0
659 465 417 6 7 1 0
660 65 675 8 10 1 0
661 566 338 6 7 1 0
662 748 541 8 10 1 0
663 745 316 6 7 1 0
664 411 317 6 7 1 0
665 546 549 8 10 1 0
666 305 314 5 7 1 0
667 935 336 6 7 1 0
668 749 276 5 7 1 0
669 123 589 8 10 1 0
670 675 294 5 7 1 0
671 641 294 5 7 1 0
672 823 526 8 10 1 0
673 679 336 6 7 1 0
674 506 449 6 7 1 0
675 302 625 8 10 1 0
676 708 279 5 7 1 0
677 583 695 8 10 1 0
678 550 287 5 7 1 0
679 371 382 6 7 1 0
680 540 403 6 7 1 0
681 345 267 5 7 1 0
682 422 409 6 7 1 0
683 765 539 8 10 1 0
684 973 618 8 10 2 0
685 263 629 8 10 1 0
686 348 359 6 7 1 0
687 676 583 8 10 1 0
688 475 672 8 10 1 0
689 1 420 5 7 1 0
690 816 454 6 7 1 0
691 685 349 6 7 1 0
692 401 477 6 7 1 0
693 20 648 8 10 1 0
694 552 338 6 7 1 0
695 246 440 6 7 1 0
696 401 290 5 7 1 0
697 639 275 5 7 1 0
698 209 570 8 10 1 0
699 875 432 6 7 1 0
700 25 705 8 10 1 0
701 708 195 3 2 1 0
702 450 319 6 7 1 0
703 423 587 8 10 1 0
704 729 385 6 7 1 0
705 230 558 8 10 1 0
706 921 308 5 7 1 0
707 415 197 3 2 1 0
708 314 476 6 7 1 0
709 127 548 8 10 1 0
710 394 484 6 7 1 0
711 676 194 3 2 1 0
712 333 684 8 10 1 0
713 4 391 5 7 1 0
714 44 224 5 7 1 0
715 480 446 6 7 1 0
716 734 291 5 7 1 0
717 418 385 6 7 1 0
718 473 200 5 7 1 0
719 574 534 8 10 1 0
720 549 300 5 7 1 0
721 981 720 8 10 1 0
722 226 537 8 10 1 0
723 240 589 8 10 1 0
724 592 290 5 7 1 0
725 352 325 6 7 1 0
726 347 577 8 10 1 0
727 676 277 5 7 1 0
728 715 297 5 7 1 0
729 979 414 6 7 1 0
730 722 291 5 7 1 0
731 357 377 6 7 1 0
732 502 549 8 10 1 0
733 975 619 8 10 2 0
734 391 308 5 7 1 0
735 720 217 5 7 1 0
736 755 590 8 10 1 0
737 897 328 6 7 1 0
738 26 302 5 7 1 0
739 784 374 6 7 1 0
740 805 430 6 7 1 0
741 455 279 5 7 1 0
742 477 421 6 7 1 0
743 125 693 8 10 1 0
744 693 353 6 7 1 0
745 358 276 5 7 1 0
746 794 379 6 7 1 0
747 520 291 5 7 1 0
748 401 382 6 7 1 0
749 85 571 8 10 1 0
750 369 693 8 10 1 0
751 584 192 3 2 1 0
752 933 369 6 7 1 0
753 740 271 5 7 1 0
754 681 410 6 7 1 0
755 759 284 5 7 1 0
756 538 599 8 10 1 0
757 526 287 5 7 1 0
758 742 196 3 2 1 0
759 398 266 5 7 1 0
760 771 587 8 10 1 0
761 714 337 6 7 1 0
762 571 597 8 10 1 0
763 687 318 6 7 1 0
764 866 273 5 7 1 0
765 473 558 8 10 1 0
766 419 524 8 10 1 0
767 204 685 8 10 1 0
768 700 265 5 7 1 0
769 156 654 8 10 1 0
770 340 361 6 7 1 0
771 645 336 6 7 1 0
772 367 653 8 10 1 0
773 433 318 6 7 1 0
774 248 561 8 10 1 0
775 493 200 5 7 1 0
776 111 683 8 10 1 0
777 406 542 8 10 1 0
778 975 681 8 10 2 0
779 612 284 5 7 1 0
780 631 193 3 2 1 0
781 598 631 8 10 1 0
782 445 281 5 7 1 0
783 54 677 8 10 1 0
784 124 575 8 10 1 0
785 594 286 5 7 1 0
786 780 313 5 7 1 0
787 65 560 8 10 1 0
788 833 366 6 7 1 0
789 901 609 8 10 1 0
790 544 298 5 7 1 0
791 852 301 5 7 1 0
792 44 617 8 10 1 0
793 418 396 6 7 1 0
794 900 330 6 7 1 0
795 350 310 5 7 1 0
796 509 286 5 7 1 0
797 253 551 8 10 1 0
798 579 199 5 7 1 0
799 829 401 6 7 1 0
800 553 269 5 7 1 0
801 571 510 8 10 1 0
802 962 538 8 10 1 0
803 337 399 6 7 1 0
804 445 270 5 7 1 0
File playground/jhucrowd_label.ipynb added (mode: 100644) (index 0000000..5ad7071)
1 {
2 "cells": [
3 {
4 "cell_type": "code",
5 "execution_count": 2,
6 "metadata": {},
7 "outputs": [],
8 "source": [
9 "path = \"0003.txt\""
10 ]
11 },
12 {
13 "cell_type": "code",
14 "execution_count": 1,
15 "metadata": {},
16 "outputs": [
17 {
18 "name": "stdout",
19 "output_type": "stream",
20 "text": [
21 "0003.txt\t jhucrowd_label.ipynb p_if_deformable_bug.py\r\n",
22 "ccnnv2_playground.py p_batch.py\t play_load_perspective_map.py\r\n",
23 "__init__.py\t p_can_adcrowdnet.py\r\n"
24 ]
25 }
26 ],
27 "source": [
28 "!ls"
29 ]
30 },
31 {
32 "cell_type": "code",
33 "execution_count": 3,
34 "metadata": {},
35 "outputs": [],
36 "source": [
37 "import pandas as pd"
38 ]
39 },
40 {
41 "cell_type": "code",
42 "execution_count": 7,
43 "metadata": {},
44 "outputs": [],
45 "source": [
46 "df = pd.read_csv(path, sep=\" \", header=None)"
47 ]
48 },
49 {
50 "cell_type": "code",
51 "execution_count": 9,
52 "metadata": {},
53 "outputs": [
54 {
55 "data": {
56 "text/html": [
57 "<div>\n",
58 "<style scoped>\n",
59 " .dataframe tbody tr th:only-of-type {\n",
60 " vertical-align: middle;\n",
61 " }\n",
62 "\n",
63 " .dataframe tbody tr th {\n",
64 " vertical-align: top;\n",
65 " }\n",
66 "\n",
67 " .dataframe thead th {\n",
68 " text-align: right;\n",
69 " }\n",
70 "</style>\n",
71 "<table border=\"1\" class=\"dataframe\">\n",
72 " <thead>\n",
73 " <tr style=\"text-align: right;\">\n",
74 " <th></th>\n",
75 " <th>0</th>\n",
76 " <th>1</th>\n",
77 " <th>2</th>\n",
78 " <th>3</th>\n",
79 " <th>4</th>\n",
80 " <th>5</th>\n",
81 " </tr>\n",
82 " </thead>\n",
83 " <tbody>\n",
84 " <tr>\n",
85 " <th>0</th>\n",
86 " <td>499</td>\n",
87 " <td>347</td>\n",
88 " <td>6</td>\n",
89 " <td>7</td>\n",
90 " <td>1</td>\n",
91 " <td>0</td>\n",
92 " </tr>\n",
93 " <tr>\n",
94 " <th>1</th>\n",
95 " <td>143</td>\n",
96 " <td>640</td>\n",
97 " <td>8</td>\n",
98 " <td>10</td>\n",
99 " <td>1</td>\n",
100 " <td>0</td>\n",
101 " </tr>\n",
102 " <tr>\n",
103 " <th>2</th>\n",
104 " <td>539</td>\n",
105 " <td>649</td>\n",
106 " <td>8</td>\n",
107 " <td>10</td>\n",
108 " <td>1</td>\n",
109 " <td>0</td>\n",
110 " </tr>\n",
111 " <tr>\n",
112 " <th>3</th>\n",
113 " <td>301</td>\n",
114 " <td>385</td>\n",
115 " <td>6</td>\n",
116 " <td>7</td>\n",
117 " <td>1</td>\n",
118 " <td>0</td>\n",
119 " </tr>\n",
120 " <tr>\n",
121 " <th>4</th>\n",
122 " <td>553</td>\n",
123 " <td>395</td>\n",
124 " <td>6</td>\n",
125 " <td>7</td>\n",
126 " <td>1</td>\n",
127 " <td>0</td>\n",
128 " </tr>\n",
129 " </tbody>\n",
130 "</table>\n",
131 "</div>"
132 ],
133 "text/plain": [
134 " 0 1 2 3 4 5\n",
135 "0 499 347 6 7 1 0\n",
136 "1 143 640 8 10 1 0\n",
137 "2 539 649 8 10 1 0\n",
138 "3 301 385 6 7 1 0\n",
139 "4 553 395 6 7 1 0"
140 ]
141 },
142 "execution_count": 9,
143 "metadata": {},
144 "output_type": "execute_result"
145 }
146 ],
147 "source": [
148 "df.head()"
149 ]
150 },
151 {
152 "cell_type": "code",
153 "execution_count": 11,
154 "metadata": {},
155 "outputs": [],
156 "source": [
157 "p = df.to_numpy()\n"
158 ]
159 },
160 {
161 "cell_type": "code",
162 "execution_count": 12,
163 "metadata": {},
164 "outputs": [
165 {
166 "data": {
167 "text/plain": [
168 "array([[499, 347, 6, 7, 1, 0],\n",
169 " [143, 640, 8, 10, 1, 0],\n",
170 " [539, 649, 8, 10, 1, 0],\n",
171 " ...,\n",
172 " [962, 538, 8, 10, 1, 0],\n",
173 " [337, 399, 6, 7, 1, 0],\n",
174 " [445, 270, 5, 7, 1, 0]])"
175 ]
176 },
177 "execution_count": 12,
178 "metadata": {},
179 "output_type": "execute_result"
180 }
181 ],
182 "source": [
183 "p"
184 ]
185 },
186 {
187 "cell_type": "code",
188 "execution_count": 13,
189 "metadata": {},
190 "outputs": [
191 {
192 "data": {
193 "text/plain": [
194 "347"
195 ]
196 },
197 "execution_count": 13,
198 "metadata": {},
199 "output_type": "execute_result"
200 }
201 ],
202 "source": [
203 "p[0,1]"
204 ]
205 },
206 {
207 "cell_type": "code",
208 "execution_count": 14,
209 "metadata": {},
210 "outputs": [
211 {
212 "data": {
213 "text/plain": [
214 "347"
215 ]
216 },
217 "execution_count": 14,
218 "metadata": {},
219 "output_type": "execute_result"
220 }
221 ],
222 "source": [
223 "p[0][1]"
224 ]
225 },
226 {
227 "cell_type": "code",
228 "execution_count": null,
229 "metadata": {},
230 "outputs": [],
231 "source": []
232 }
233 ],
234 "metadata": {
235 "kernelspec": {
236 "display_name": "Python 3",
237 "language": "python",
238 "name": "python3"
239 },
240 "language_info": {
241 "codemirror_mode": {
242 "name": "ipython",
243 "version": 3
244 },
245 "file_extension": ".py",
246 "mimetype": "text/x-python",
247 "name": "python",
248 "nbconvert_exporter": "python",
249 "pygments_lexer": "ipython3",
250 "version": "3.8.1"
251 }
252 },
253 "nbformat": 4,
254 "nbformat_minor": 4
255 }
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/hahattpro/crowd_counting_framework

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/hahattpro/crowd_counting_framework

Clone this repository using git:
git clone git://git.rocketgit.com/user/hahattpro/crowd_counting_framework

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main