-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
I am using this snippet of code to augment a dataset:
augmentor = createAugmentor("detection", "coco", "coco", "linear", "/content/train", {"outputPath": "/content/train_new"})
transformer = transformerGenerator("detection")
for angle in [45, 90, 135, 180]:
rotate = createTechnique("rotate", {"angle": angle})
augmentor.addTransformer(transformer(rotate))
for i in [1, -1]:
flip = createTechnique("flip", {"flip": i})
augmentor.addTransformer(transformer(flip))
crop = createTechnique("crop", {"percentage": 0.7, "startFrom": "TOPLEFT"})
augmentor.addTransformer(transformer(crop))
blur = createTechnique("blurring", {"ksize": 5})
augmentor.addTransformer(transformer(blur))
augmentor.applyAugmentation()
I am getting an error:
TypeError Traceback (most recent call last)
<ipython-input-6-c9fb2524c1cf> in <module>()
12 augmentor.addTransformer(transformer(flip))
13
---> 14 augmentor.applyAugmentation()
5 frames
/usr/local/lib/python3.7/dist-packages/clodsa/augmentors/cocoLinearDetectionAugmentor.py in applyAugmentation(self)
63 (self.outputPath, self.transformers, self.imagesPath, self.dictImages[x],
64 self.dictAnnotations[x],self.ignoreClasses)
---> 65 for x in self.dictImages.keys())
66 data = {}
67 data['info'] = self.info
/usr/local/lib/python3.7/dist-packages/joblib/parallel.py in __call__(self, iterable)
1052
1053 with self._backend.retrieval_context():
-> 1054 self.retrieve()
1055 # Make sure that we get a last message telling us we are done
1056 elapsed_time = time.time() - self._start_time
/usr/local/lib/python3.7/dist-packages/joblib/parallel.py in retrieve(self)
931 try:
932 if getattr(self._backend, 'supports_timeout', False):
--> 933 self._output.extend(job.get(timeout=self.timeout))
934 else:
935 self._output.extend(job.get())
/usr/local/lib/python3.7/dist-packages/joblib/_parallel_backends.py in wrap_future_result(future, timeout)
540 AsyncResults.get from multiprocessing."""
541 try:
--> 542 return future.result(timeout=timeout)
543 except CfTimeoutError as e:
544 raise TimeoutError from e
/usr/lib/python3.7/concurrent/futures/_base.py in result(self, timeout)
433 raise CancelledError()
434 elif self._state == FINISHED:
--> 435 return self.__get_result()
436 else:
437 raise TimeoutError()
/usr/lib/python3.7/concurrent/futures/_base.py in __get_result(self)
382 def __get_result(self):
383 if self._exception:
--> 384 raise self._exception
385 else:
386 return self._result
TypeError: function takes exactly 4 arguments (2 given)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels