DLR-RM / AugmentedAutoencoder

Official Code: Implicit 3D Orientation Learning for 6D Object Detection from RGB Images
MIT License
338 stars 97 forks source link

cannot reconstruct dark object, LINEMOD driller #44

Closed HsiaoTsan closed 5 years ago

HsiaoTsan commented 5 years ago

Thank you again for your wonderful work.

After trained with LINEMOD driller.ply, the reconstruction image is a pure black image.

I have tried to set BOOTSTRAP_RATIO = 10 to train, it still reconstruct dark image after 30,000 iterations of training.

It seems that it is because the original rendering image is dark, and it is even darker when some augmentation added to it.

Is there a way to render a brighter image? If possible, could you share your training config file for LINEMOD driller for us?

My training config file for LINEMOD driller.ply:

[Paths]
MODEL_PATH: /ACCV12/models/driller.ply
BACKGROUND_IMAGES_GLOB: /VOCdevkit/VOC2007/JPEGImages/*.jpg

[Dataset]
MODEL: reconst
H: 128
W: 128
C: 3
RADIUS: 700
RENDER_DIMS: (640, 480)
# RENDER_DIMS: (Width, Height)
K: [572.41140, 0.0, 325.26110, 0.0, 573.57043, 242.04899, 0.0, 0.0, 1.0]
# Scale vertices to mm
VERTEX_SCALE: 1
ANTIALIASING: 8
PAD_FACTOR: 1.2
CLIP_NEAR: 10
CLIP_FAR: 10000
NOOF_TRAINING_IMGS: 30000
NOOF_BG_IMGS: 10000

[Augmentation]
REALISTIC_OCCLUSION: False
SQUARE_OCCLUSION: False
MAX_REL_OFFSET: 0.20
CODE: Sequential([
    #Sometimes(0.5, PerspectiveTransform(0.05)),
    #Sometimes(0.5, CropAndPad(percent=(-0.05, 0.1))),
    Sometimes(0.5, Affine(scale=(1.0, 1.2))),
    Sometimes(0.5, CoarseDropout( p=0.2, size_percent=0.05) ),
    Sometimes(0.5, GaussianBlur(1.2*np.random.rand())),
    Sometimes(0.5, Add((0, 25), per_channel=0.3)),
    Sometimes(0.3, Invert(0.2, per_channel=True)),
    #Sometimes(0.5, Multiply((0.9, 1.2), per_channel=0.5)),
    Sometimes(0.5, Multiply((1, 1.2))),
    Sometimes(0.5, ContrastNormalization((0.5, 2.2), per_channel=0.3))
    ], random_order=False)

[Embedding]
EMBED_BB: True
MIN_N_VIEWS: 2562
NUM_CYCLO: 36

[Network]
BATCH_NORMALIZATION: False
AUXILIARY_MASK: True
VARIATIONAL: 0
LOSS: L2
BOOTSTRAP_RATIO: 10
NORM_REGULARIZE: 0
LATENT_SPACE_SIZE: 128
NUM_FILTER: [128, 256, 512, 512]
STRIDES: [2, 2, 2, 2]
KERNEL_SIZE_ENCODER: 5
KERNEL_SIZE_DECODER: 5

[Training]
OPTIMIZER: Adam
NUM_ITER: 30000
BATCH_SIZE: 64
LEARNING_RATE: 2e-4
SAVE_INTERVAL: 5000

[Queue]
# OPENGL_RENDER_QUEUE_SIZE: 500
NUM_THREADS: 10
QUEUE_SIZE: 50

image

MartinSmeyer commented 5 years ago

yes, you are right it is a particular dark object.. Try to reduce the augmentations a bit and set BOOTSTRAP_RATIO: 16.

CODE: Sequential([
    Sometimes(0.4, CoarseDropout( p=0.1, size_percent=0.05) ),
    Sometimes(0.5, Affine(scale=(1.0, 1.2))),
    Sometimes(0.5, GaussianBlur(np.random.rand())),
    Sometimes(0.5, Add((-20, 20), per_channel=0.3)),
    Sometimes(0.4, Invert(0.20, per_channel=True)),
    Sometimes(0.5, Multiply((0.7, 1.4), per_channel=0.8)),
    Sometimes(0.5, Multiply((0.7, 1.4))),
    Sometimes(0.5, ContrastNormalization((0.5, 2.0), per_channel=0.3))
    ], random_order=False)