/evaluator.py (35cc7bfe48a4ed8dc56635fd3a6763612d8af771) (428 bytes) (mode 100644) (type blob)
class MAECalculator:
def __init__(self):
self.count = 0
self.mae_sum = 0
def get_mae(self):
return self.mae_sum / self.count
def eval(self, y_pred, y_true):
pred_count = y_pred.sum()
true_count = y_true.sum()
mae = abs(pred_count - true_count)
self.mae_sum += mae
self.count += 1
def reset(self):
self.count = 0
self.mae_sum = 0
Mode |
Type |
Size |
Ref |
File |
100644 |
blob |
42 |
35eb2d2be02bde3d859e08bfd0a4a87849fc2495 |
.gitignore |
100644 |
blob |
176 |
929964f43dfbe980009a73463fef2d8b6bbeb973 |
README.md |
100644 |
blob |
2440 |
e7f4e6db4a2a8801380e231ade5babaa15012492 |
args_util.py |
040000 |
tree |
- |
5e9d7f0e1fd3a9e4d5a37f3d6de0c3ecd3125af8 |
backup_notebook |
040000 |
tree |
- |
55d1d196f5b6ed4bfc1e8a715df1cfff1dd18117 |
bug |
100644 |
blob |
1775 |
1165f1aba0814b448a3595a32bd74f1967509509 |
crowd_counting_error_metrics.py |
100644 |
blob |
9434 |
2d67c3325166241414194d88f5358297a9ac0d5a |
data_flow.py |
040000 |
tree |
- |
c6749f18a4aed2bde949801eaf79004a1495efcc |
dataset_script |
100644 |
blob |
428 |
35cc7bfe48a4ed8dc56635fd3a6763612d8af771 |
evaluator.py |
100644 |
blob |
160 |
836144a442570bb6e334d00b7bd9dcfbb267fa0c |
hard_code_variable.py |
100644 |
blob |
10392 |
9cfb5ccb8d01e9a2039d9e6e23715064630c5bef |
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 |
- |
8b34193c0ef969d4fb25ec61642d3f9ea1db2c33 |
models |
040000 |
tree |
- |
970ac54d8293aed6667e016f2245547f3a5449c3 |
pytorch_ssim |
040000 |
tree |
- |
46b3d7a0d3dee92803855a3d7d2d1f859eb5a9a5 |
train_script |
100644 |
blob |
2211 |
b515bbd87e60ba409f34cf3060d45d798acf683c |
visualize_data_loader.py |
100644 |
blob |
611 |
4064de3335374a5d537060f597c1a41c1d305ad0 |
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