List of commits:
Subject Hash Author Date (UTC)
normal both ssim and psnr 8c3dce50a264bea46fae09ec9390ebaa188134ed Thai Thien 2020-12-06 16:46:35
forgot the abs da4b718d0e4c4e826fec189297807b478fa05bfc Thai Thien 2020-12-06 16:41:51
psnr abs 255 ffaf76a25ca6c15ed8d36a77c21bd6d9278ab690 Thai Thien 2020-12-06 16:40:51
normalize 255 d4e37756c87bb32afdd34ee368e0b5e826b9901f Thai Thien 2020-12-06 16:38:02
normalize y and y_pred 2d66ee480bf65be75533e6ee1d8e0c30f781d4c8 Thai Thien 2020-12-06 16:34:44
x b887624be4145f94800867033574b65e597de963 Thai Thien 2020-12-06 16:32:49
no more abs and stuff 2c670747b22280596bd10aa37508405e7b94f05c Thai Thien 2020-12-06 16:31:58
self calculate psnr 384da4f7f346e1e984aa4cd7698cc3627c374dba Thai Thien 2020-12-06 16:27:42
let max value is y_max eef482d4f6b13eb78db9f4b32a6fd72501b0aeaf Thai Thien 2020-12-06 16:18:59
now we add data range as max value cc50e0216660bd609bb562085a1c3011cadc8935 Thai Thien 2020-12-06 16:10:27
add max value c6788b7e84722619775990f1bf9c57493768c309 Thai Thien 2020-12-06 16:06:10
try to rig ssim to mae to see how it work 0881597408f3531982df43a1503a193c4874bcfa Thai Thien 2020-12-06 16:02:02
try remove padding 0f1f913d8f99210f2f53309ac44c71ed9baf0b76 Thai Thien 2020-12-06 15:46:46
a 147a73727888e4bbcd3584fb32ae60a62b43b77a Thai Thien 2020-12-06 15:41:18
reduction = sum caaf7ea2f013097c2d0275a3c49bffb6ae7e4b69 Thai Thien 2020-12-06 15:40:13
cuda() and we fix 41f49e7aa28595cb6438519dddb5e17434a44d3e Thai Thien 2020-12-06 15:34:53
minor fix 138 6178f63cb061ec7086a1748a8e9d4f4a03ea96e5 Thai Thien 2020-12-06 15:33:08
fix measure ssim psnr 88bb9b78e8ae45199074aa1076b15c73f13e6cb6 Thai Thien 2020-12-06 15:30:58
print y and y_pred shape 90ab90465dabc4bd1171f4500eb01c45cca97420 Thai Thien 2020-12-06 15:23:09
ccnn baseline f02c3084f28f811879e36e9a309993d468535dc3 Thai Thien 2020-12-06 15:08:11
Commit 8c3dce50a264bea46fae09ec9390ebaa188134ed - normal both ssim and psnr
Author: Thai Thien
Author date (UTC): 2020-12-06 16:46
Committer name: Thai Thien
Committer date (UTC): 2020-12-06 16:46
Parent(s): da4b718d0e4c4e826fec189297807b478fa05bfc
Signer:
Signing key:
Signing status: N
Tree: 5acc5a5e7cc444e65741c3e95b37a79abbca8957
File Lines added Lines deleted
crowd_counting_error_metrics.py 16 8
File crowd_counting_error_metrics.py changed (mode: 100644) (index 200eb21..a34e84e)
... ... class CrowdCountingMeanSSIMabs(Metric):
140 140
141 141 # rig_y = torch.sum(y) # rig_y = torch.sum(y)
142 142 # rig_y_pred = torch.sum(y_pred) # rig_y_pred = torch.sum(y_pred)
143 y_max = torch.max(y)
144 y_pred_max = torch.max(y_pred)
145 max_value = y_max
146 ssim_metric = piq.ssim(y, y_pred, reduction="sum", data_range=max_value.item())
143 # y_max = torch.max(y)
144 # y_pred_max = torch.max(y_pred)
145 # max_value = y_max
146
147 y = y / torch.max(y) * 255
148 y_pred = y_pred / torch.max(y_pred) * 255
149
150 ssim_metric = piq.ssim(y, y_pred, reduction="sum", data_range=255)
147 151 # ssim_metric = torch.abs(rig_y - rig_y_pred) # ssim_metric = torch.abs(rig_y - rig_y_pred)
148 152
149 153
 
... ... class CrowdCountingMeanSSIMclamp(Metric):
238 242 pad_density_map_tensor[:, 0, :y_pred.shape[2], :y_pred.shape[3]] = y_pred pad_density_map_tensor[:, 0, :y_pred.shape[2], :y_pred.shape[3]] = y_pred
239 243 y_pred = pad_density_map_tensor y_pred = pad_density_map_tensor
240 244
241 y_max = torch.max(y)
242 y_pred_max = torch.max(y_pred)
243 max_value = torch.max(y_max, y_pred_max)
244 ssim_metric = piq.ssim(y, y_pred, reduction="sum", data_range=max_value.item())
245 # y_max = torch.max(y)
246 # y_pred_max = torch.max(y_pred)
247 # max_value = torch.max(y_max, y_pred_max)
248
249 y = y / torch.max(y) * 255
250 y_pred = y_pred / torch.max(y_pred) * 255
251
252 ssim_metric = piq.ssim(y, y_pred, reduction="sum", data_range=255)
245 253
246 254 self._sum += ssim_metric.item() self._sum += ssim_metric.item()
247 255 # we multiply because ssim calculate mean of each image in batch # we multiply because ssim calculate mean of each image in batch
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