Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Object Detection] Is the AutoAugment option already working? #7401

Open
JonasGlow opened this issue Aug 7, 2019 · 4 comments
Open

[Object Detection] Is the AutoAugment option already working? #7401

JonasGlow opened this issue Aug 7, 2019 · 4 comments

Comments

@JonasGlow
Copy link

System information

  • What is the top-level directory of the model you are using:
  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • TensorFlow installed from (source or binary):
  • TensorFlow version (use command below):
  • Bazel version (if compiling from source):
  • CUDA/cuDNN version:
  • GPU model and memory:
  • Exact command to reproduce:
    Not important.

Is the AutoAugment option in the preprocessor.proto already working?
I tried to use it but it always couldn't find the augmentation.

// Apply an Autoaugment policy to the image and bounding boxes.
message AutoAugmentImage {

  // What AutoAugment policy to apply to the Image
  optional string policy_name = 1 [default="v0"];
} 
@staubda
Copy link

staubda commented Aug 15, 2019

Using the object detection research repo I'm running it by adding the following to my config file (make sure you've compiled your protos recently enough to have it included)

  data_augmentation_options {
    autoaugment_image {
    }
  }

however, I'm hitting the following error:

  File "/home/david_staub/.conda/envs/user/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1334, in_do_call
    return fn(*args)
  File "/home/david_staub/.conda/envs/user/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1319, in_run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/david_staub/.conda/envs/user/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1407, in_call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: output dimensions must be positive
         [[{{node cond_10/cond/cond/while/cond/translate/transform/ImageProjectiveTransformV2}} = ImageProjectiveTransformV2[dtype=DT_UINT8, interpolation="NEAREST", _device="/device:CPU:0"](cond_10/cond/cond/while/cond/translate/transform/strided_slice, cond_10/cond/cond/while/cond/translate/translations_to_projective_transforms/concat, cond_10/cond/cond/while/cond/translate/transform/strided_slice_2)]]
         [[{{node IteratorGetNext}} = IteratorGetNext[output_shapes=[[24], [24,300,300,3], [24,2], [24,3], [24,100], [24,100,4], [24,100,36], [24,100,36], [24,100], [24,100], [24,100], [24]], output_types=[DT_INT32, DT_FLOAT, DT_INT32, DT_INT32,DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_INT32, DT_BOOL, DT_FLOAT, DT_INT32], _device="/job:localhost/replica:0/task:0/device:CPU:0"](IteratorV2)]]
         [[{{node GroupCrossDeviceControlEdges_0/ConstantFolding/Loss/Compare_7/IOU/Intersection/split_1-folded-3/_10252}}= _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_3293_...1-folded-3", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]

Also as an FYI, you can figure out the names of augmentation options and their parameters (that you'll need for the config file) by looking in the generated pb2.py file, i.e. models/research/object_detection/protos/preprocessor_pb2.py. Wish this stuff was better documented (or documented at all).

EDIT

Rerunning the training script (didn't change anything) and haven't hit the error so far. Maybe non-deterministic?

EDIT 2

Crashed again after running for a couple thousand steps.

@JonasGlow
Copy link
Author

Sorry for the late response. I compiled my protos and i can find the autoaugmentation step in den preprocessor_pb2.py, but i still getting this error.

Message type "object_detection.protos.PreprocessingStep" has no field named "autoaugment_image".

@gowthamkpr gowthamkpr added the models:research models that come under research directory label Sep 10, 2019
@Adblu
Copy link

Adblu commented Apr 23, 2020

I can confirm that using most recent object detection api I got that error. Any Fix ?

@koi-boy
Copy link

koi-boy commented Mar 21, 2021

Using the object detection research repo I'm running it by adding the following to my config file (make sure you've compiled your protos recently enough to have it included)

  data_augmentation_options {
    autoaugment_image {
    }
  }

however, I'm hitting the following error:

  File "/home/david_staub/.conda/envs/user/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1334, in_do_call
    return fn(*args)
  File "/home/david_staub/.conda/envs/user/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1319, in_run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/david_staub/.conda/envs/user/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1407, in_call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: output dimensions must be positive
         [[{{node cond_10/cond/cond/while/cond/translate/transform/ImageProjectiveTransformV2}} = ImageProjectiveTransformV2[dtype=DT_UINT8, interpolation="NEAREST", _device="/device:CPU:0"](cond_10/cond/cond/while/cond/translate/transform/strided_slice, cond_10/cond/cond/while/cond/translate/translations_to_projective_transforms/concat, cond_10/cond/cond/while/cond/translate/transform/strided_slice_2)]]
         [[{{node IteratorGetNext}} = IteratorGetNext[output_shapes=[[24], [24,300,300,3], [24,2], [24,3], [24,100], [24,100,4], [24,100,36], [24,100,36], [24,100], [24,100], [24,100], [24]], output_types=[DT_INT32, DT_FLOAT, DT_INT32, DT_INT32,DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_INT32, DT_BOOL, DT_FLOAT, DT_INT32], _device="/job:localhost/replica:0/task:0/device:CPU:0"](IteratorV2)]]
         [[{{node GroupCrossDeviceControlEdges_0/ConstantFolding/Loss/Compare_7/IOU/Intersection/split_1-folded-3/_10252}}= _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_3293_...1-folded-3", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]

Also as an FYI, you can figure out the names of augmentation options and their parameters (that you'll need for the config file) by looking in the generated pb2.py file, i.e. models/research/object_detection/protos/preprocessor_pb2.py. Wish this stuff was better documented (or documented at all).

EDIT

Rerunning the training script (didn't change anything) and haven't hit the error so far. Maybe non-deterministic?

EDIT 2

Crashed again after running for a couple thousand steps.

could you tell me how to fix this problem?I have struggle too long for this problem. thx

@jaeyounkim jaeyounkim added models:research:odapi ODAPI and removed models:research models that come under research directory labels Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants