Thank you very much for this script. Just a heads up that for small data sets, sub 6000 images, the user will encounter an error per below. Its easy to debug, but a warning might help future users. Thanks again.
File "script/bag2tf.py", line 475, in main
splits=split_list, center_only=center_only, debug_print=debug_print)
File "script/bag2tf.py", line 207, in init
writer = ShardWriter(self._outdir, s[0], scaled_images, max_num_shards=scaled_shards)
File "script/bag2tf.py", line 135, in init
self.num_entries_per_shard = num_entries // max_num_shards
ZeroDivisionError: float divmod()
Thank you very much for this script. Just a heads up that for small data sets, sub 6000 images, the user will encounter an error per below. Its easy to debug, but a warning might help future users. Thanks again.
File "script/bag2tf.py", line 475, in main splits=split_list, center_only=center_only, debug_print=debug_print) File "script/bag2tf.py", line 207, in init writer = ShardWriter(self._outdir, s[0], scaled_images, max_num_shards=scaled_shards) File "script/bag2tf.py", line 135, in init self.num_entries_per_shard = num_entries // max_num_shards ZeroDivisionError: float divmod()