WisconsinAIVision / yolact_edge

The first competitive instance segmentation approach that runs on small edge devices at real-time speeds.
MIT License
1.26k stars 273 forks source link

ZeroDivisionError:division by zero #199

Open hlbtjdws1 opened 1 year ago

hlbtjdws1 commented 1 year ago

[08/22 22:09:35 yolact.train]: Args: train.py --config=yolact_edge_strawberry_config loading annotations into memory... Done (t=0.00s) creating index... index created! loading annotations into memory... Done (t=0.00s) creating index... index created! [08/22 22:09:36 yolact.train]: Initializing weights... Traceback (most recent call last): File "train.py", line 708, in train(0, args=args) File "train.py", line 286, in train num_epochs = math.ceil(cfg.max_iter / epoch_size) ZeroDivisionError: division by zero

train on pictures

Wong-denis commented 1 year ago

I also get the same error, which i haven't seen before you can set
--batch_size=2

hlbtjdws1 commented 1 year ago

Solved already. epoch_size = len(dataset) // args.batch_size // args.num_gpus so that means batch_size should be smaller than len(dataset) in order to get a number >= 1