dvlab-research / PanopticFCN

Fully Convolutional Networks for Panoptic Segmentation (CVPR2021 Oral)
Apache License 2.0
391 stars 53 forks source link

Does the batch size matter? #28

Closed dspcad closed 2 years ago

dspcad commented 2 years ago

Hi,

I am trying to reproduce your result of COCO with the command below: python3 projects/PanopticFCN/train.py --config-file projects/PanopticFCN/configs/PanopticFCN-R50-1x.yaml --num-gpus 1 SOLVER.IMS_PER_BATCH 2

I couldn't run it w/o "SOLVER.IMS_PER_BATCH 2" but my result was very poor. Here is the command I run for the evaluation: python3 projects/PanopticFCN/train.py --config-file projects/PanopticFCN/configs/PanopticFCN-R50-1x.yaml --num-gpus 1 --eval-only MODEL.WEIGHTS output/model_final.pth image

I used your pretrained model and the result was way better than mine. I would appreciate your help if you would like to point out where I went wrong. Thanks.

yanwei-li commented 2 years ago

Hi, thanks for your interest. The batch size really matters. It is recommended to use batch 16 for training. Or you can try 400-size for training, and more images can be used in each batch.

yghcats commented 2 years ago

Hi, @yanwei-li @dspcad Here is the command I run for the evaluation: python3 projects/PanopticFCN/train.py --config-file projects/PanopticFCN/configs/PanopticFCN-R50-1x.yaml --num-gpus 1 --eval-only MODEL.WEIGHTS output/panoptic_fcn_r50_1x.pth

An error was encountered: File "/home/gtx1080/anaconda3/envs/detectron/lib/python3.6/json/decoder.py", line 342, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 318) My environment:python:3.6 PyTorch:1.7 cuda:10.1 I would appreciate your help if you would like to point out where I went wrong. Thanks.

yanwei-li commented 2 years ago

Hi, it seems like environment error. Have you already installed the Detectron2 and test with no problem?