@@ -12,7 +12,7 @@ def _uuid_check(uuids):
"UUIDs are not unique!"
def new_iterator(data, n_jobs, batch_size, repeat=True, shuffle=True, n_prefetch=2, *,
- use_threads: bool = False):
+ use_threads: bool = True):
from chainer.iterators import SerialIterator, MultiprocessIterator, MultithreadIterator
it_kwargs = dict(batch_size=batch_size, repeat=repeat, shuffle=shuffle)
@@ -23,6 +23,9 @@ def dimensions(im):
def rescale(im, coords, rescale_size, center_cropped=True, no_offset=False):
h, w, c = dimensions(im)
+ if np.all(coords == -1):
+ return coords
+
offset = 0
if center_cropped:
_min_val = min(w, h)