zhiyuanyou / SAFECount

[WACV 2023] Few-shot Object Counting with Similarity-Aware Feature Enhancement
Other
124 stars 22 forks source link

Hello, could you tell me how the density map is generated #8

Closed Transformer-man closed 1 year ago

Transformer-man commented 1 year ago

QQ截图20230314154255 Hello, could you tell me how the density map is generated

zhiyuanyou commented 1 year ago

Hi~

Could you give me more information about this density map?

vasanth4224 commented 1 year ago

Dear admin, How to generate density map in crowd using pretrained model? download

zhiyuanyou commented 1 year ago

Please read Sec. 1.4, Sec. 1.4 4), & Sec. 1.1 in README. You should run eval.sh or eval_torch.sh under this directory: https://github.com/zhiyuanyou/SAFECount/blob/main/experiments/Mall/ for evaluation and visualization.

If your question is about the implementation details of visualization, you can see: https://github.com/zhiyuanyou/SAFECount/blob/main/utils/vis_helper.py

vasanth4224 commented 1 year ago

(safeCount) a@r4611:/media/a/2TB/SAFECount-main$ sh experiments/Mall/eval_torch.sh /home/a/anaconda3/envs/safeCount/lib/python3.8/site-packages/torch/distributed/launch.py:181: FutureWarning: The module torch.distributed.launch is deprecated and will be removed in future. Use torchrun. Note that --use-env is set by default in torchrun. If your script expects --local-rank argument to be set, please change it to read from os.environ['LOCAL_RANK'] instead. See https://pytorch.org/docs/stable/distributed.html#launch-utility for further instructions

warnings.warn( Traceback (most recent call last): File "/home/a/anaconda3/envs/safeCount/lib/python3.8/site-packages/torch/distributed/run.py", line 632, in determine_local_world_size return int(nproc_per_node) ValueError: invalid literal for int() with base 10: ''

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/a/anaconda3/envs/safeCount/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/a/anaconda3/envs/safeCount/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/a/anaconda3/envs/safeCount/lib/python3.8/site-packages/torch/distributed/launch.py", line 196, in main() File "/home/a/anaconda3/envs/safeCount/lib/python3.8/site-packages/torch/distributed/launch.py", line 192, in main launch(args) File "/home/a/anaconda3/envs/safeCount/lib/python3.8/site-packages/torch/distributed/launch.py", line 177, in launch run(args) File "/home/a/anaconda3/envs/safeCount/lib/python3.8/site-packages/torch/distributed/run.py", line 784, in run config, cmd, cmd_args = config_from_args(args) File "/home/a/anaconda3/envs/safeCount/lib/python3.8/site-packages/torch/distributed/run.py", line 691, in config_from_args nproc_per_node = determine_local_world_size(args.nproc_per_node) File "/home/a/anaconda3/envs/safeCount/lib/python3.8/site-packages/torch/distributed/run.py", line 650, in determine_local_world_size raise ValueError(f"Unsupported nproc_per_node value: {nproc_per_node}") from e ValueError: Unsupported nproc_per_node value:

bro, could you please help me with this error? Screenshot from 2023-05-02 15-27-26

zhiyuanyou commented 1 year ago

Please see Sec. 1.1 in README, which writes in detail: