Taking the ShanghaiTech Dataset as an example, we recommend you to extract the STCs as below. Please make sure that you have sufficient storage. python gen_patches.py --dataset shanghaitech --phase ...