question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

_make_data_gen() and start_enqueueing_threads()

See original GitHub issue

I’m not sure I understand what is happening in inputs/kitti_seg_input.py here: https://github.com/MarvinTeichmann/KittiSeg/blob/master/inputs/kitti_seg_input.py#L169-L173.

elif phase == 'train':
    yield jitter_input(hypes, image, gt_image)
    yield jitter_input(hypes, np.fliplr(image), np.fliplr(gt_image))

So, we are yielding 2 generators to the variable, gen, in L359:

gen = _make_data_gen(hypes, phase, data_dir)
gen.next() # but then why do we just iterate over it? 

But then why do we do the gen.next() in the following line, without making use of the returned value? What is the purpose of this portion of the code, in start_enqueueing_threads()?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
MarvinTeichmanncommented, Jul 28, 2017

Yes, data augmentation like random flipping is used to increasing the amount of effectively available training data.

Other forms of data augmentation applied is random aspect ratio augmentation (random resize, random crop) and color augmentation (random brightness, random contrast, random saturation and random hue).

0reactions
MarvinTeichmanncommented, Oct 31, 2017

If you use batch_size = 1 (default) you can train the network with variable image sizes (default and recommended).

For batch_sizes > 1 all inputs need the same size. That can be achieved by setting reseize_image or crop_patch to true. Resize_image will perform bilinear resize after the augmentation (if you use both random resize and random crop this means that still meaningful augmentation is done) . crop_patch will crop a random patch of fixed size on the image.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found