Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CommissarMa/CSRNet-pytorch
/ functions
Functions
22 in github.com/CommissarMa/CSRNet-pytorch
⨍
Functions
22
◇
Types & classes
5
↓ 2 callers
Function
make_layers
(cfg, in_channels=3, batch_norm=False, dilation=False)
model.py:46
↓ 1 callers
Method
__mkdir
create directory while not exist
config.py:21
↓ 1 callers
Method
_initialize_weights
(self)
model.py:35
↓ 1 callers
Function
cal_mae
Calculate the MAE of the test data. img_root: the root of test image data. gt_dmap_root: the root of test ground truth density-map data.
test.py:10
↓ 1 callers
Function
create_test_dataloader
Create train dataloader. root: the dataset root.
dataset.py:81
↓ 1 callers
Function
create_train_dataloader
Create train dataloader. root: the dataset root. use_flip: True or false. batch size: the batch size.
dataset.py:62
↓ 1 callers
Function
denormalize
(tensor)
utils.py:5
↓ 1 callers
Function
generate_fixed_kernel_densitymap
Use fixed size kernel to construct the ground truth density map for ShanghaiTech PartB. image: the image with type numpy.ndarray and [h
data_preparation/dmap_for_SHHB.py:14
↓ 1 callers
Function
generate_k_nearest_kernel_densitymap
Use k nearest kernel to construct the ground truth density map for ShanghaiTech PartA. image: the image with type numpy.ndarray and [he
data_preparation/dmap_for_SHHA.py:20
↓ 1 callers
Function
generate_perspective_densitymap
Use perspective kernel to generate density map. image: the image. points: n points with [col, row] p_map: perspective map.
data_preparation/dmap_for_MALL.py:10
↓ 1 callers
Method
get_params
(img, factor)
dataset.py:125
↓ 1 callers
Method
read_image_and_dmap
(self, fname)
dataset.py:50
Method
__call__
img: PIL.Image dmap: PIL.Image
dataset.py:104
Method
__call__
img: PIL.Image dmap: PIL.Image
dataset.py:132
Method
__getitem__
(self, index)
dataset.py:38
Method
__init__
(self)
config.py:10
Method
__init__
root: the root path of dataset. phase: train or test. main_transform: transforms on both image and density map. img_t
dataset.py:19
Method
__init__
(self, factor=16)
dataset.py:121
Method
__init__
(self, load_weights=False)
model.py:9
Method
__len__
(self)
dataset.py:35
Function
estimate_density_map
Show one estimated density-map. img_root: the root of test image data. gt_dmap_root: the root of test ground truth density-map data.
test.py:36
Method
forward
(self, x)
model.py:28