/visualize_util.py (0190315ac06c5ba26ba8777fec0d3bef334d1da3) (910 bytes) (mode 100644) (type blob)
import glob
import PIL.Image as Image
from matplotlib import pyplot as plt
from matplotlib import cm as CM
import os
import numpy as np
from PIL import Image
def save_density_map(density_map, name):
plt.figure(dpi=600)
plt.axis('off')
plt.margins(0, 0)
plt.imshow(density_map, cmap=CM.jet)
plt.savefig(name, dpi=600, bbox_inches='tight', pad_inches=0)
plt.close()
def save_density_map_with_colorrange(density_map, name, vmin, vmax):
plt.figure(dpi=600)
plt.axis('off')
plt.margins(0, 0)
plt.imshow(density_map, cmap=CM.jet)
plt.clim(vmin, vmax)
plt.savefig(name, dpi=600, bbox_inches='tight', pad_inches=0)
plt.close()
def save_img(imgnp, name):
# plt.imshow(imgnp[0].permute(1, 2, 0).numpy())
plt.imsave(name, imgnp[0].permute(1, 2, 0).numpy())
# plt.show()
# im = Image.fromarray(imgnp[0].permute(1, 2, 0).numpy())
# im.save(name)
Mode |
Type |
Size |
Ref |
File |
100644 |
blob |
61 |
169fe2b7d512a59cfedf86ddb7ed040173c7434d |
.gitignore |
100644 |
blob |
419 |
b2f2bf709bdb475a4d2cf349bcfc4da53ff7870d |
README.md |
100644 |
blob |
2883 |
2e74c0766f12afff56a0b1621055a2794f64418a |
args_util.py |
040000 |
tree |
- |
5e9d7f0e1fd3a9e4d5a37f3d6de0c3ecd3125af8 |
backup_notebook |
040000 |
tree |
- |
55d1d196f5b6ed4bfc1e8a715df1cfff1dd18117 |
bug |
100644 |
blob |
1775 |
1165f1aba0814b448a3595a32bd74f1967509509 |
crowd_counting_error_metrics.py |
100644 |
blob |
11956 |
a3f3d3c1877596d79b75d7943ac7bf7e3879d752 |
data_flow.py |
040000 |
tree |
- |
17c9c74641b7acc37008a7f940a62323dd5b2b6b |
data_util |
040000 |
tree |
- |
2a46ff24b8b8997b4ca07c18e2326cb3c35dc5a0 |
dataset_script |
100644 |
blob |
4460 |
9b254c348a3453f4df2c3ccbf21fb175a16852de |
eval_context_aware_network.py |
100644 |
blob |
428 |
35cc7bfe48a4ed8dc56635fd3a6763612d8af771 |
evaluator.py |
100644 |
blob |
2718 |
b09b84e8b761137654ba6904669799c4866554b3 |
hard_code_variable.py |
100644 |
blob |
15300 |
cb90faba0bd4a45f2606a1e60975ed05bfacdb07 |
main_pacnn.py |
100644 |
blob |
2760 |
3c2d5ba1c81ef2770ad216c566e268f4ece17262 |
main_shanghaitech.py |
100644 |
blob |
2683 |
29189260c1a2c03c8e59cd0b4bd61df19d5ce098 |
main_ucfcc50.py |
100644 |
blob |
815 |
eeb34682e8425776dc9e70326a77c2333ae10e5c |
model_util.py |
040000 |
tree |
- |
4d8049aed49b47d71d677d00369c5333bd9451e9 |
models |
040000 |
tree |
- |
d1c13a0fa59c995bbc5c766ea807108aabbc41a8 |
playground |
040000 |
tree |
- |
970ac54d8293aed6667e016f2245547f3a5449c3 |
pytorch_ssim |
040000 |
tree |
- |
cedc468471f9743100c7f608acc15c89be992a6c |
train_script |
100644 |
blob |
4420 |
09c9f3bf867542ac93a1e19546f790feab8c53bd |
visualize_data_loader.py |
100644 |
blob |
910 |
0190315ac06c5ba26ba8777fec0d3bef334d1da3 |
visualize_util.py |
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