ea83d29de00a46ab008455247fbdfc53182d747b,aocr/util/data_gen.py,DataGen,gen,#DataGen#Any#,54
Before Change
img_data = Image.open(StringIO(img))
width, height = img_data.size
resized_width = math.floor(float(width) / height * self.IMAGE_HEIGHT)
b_idx = min(resized_width, self.bucket_max_width)
bucket_size = self.bucket_data[b_idx].append(img, resized_width, word, lex)
if bucket_size >= batch_size:
bucket = self.bucket_data[b_idx].flush_out(
After Change
if bucket is not None:
yield bucket
else:
assert False, "No valid bucket."
except tf.errors.OutOfRangeError:
break
self.clear()
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: emedvedev/attention-ocr
Commit Name: ea83d29de00a46ab008455247fbdfc53182d747b
Time: 2017-07-23
Author: edward.medvedev@gmail.com
File Name: aocr/util/data_gen.py
Class Name: DataGen
Method Name: gen
Project Name: NifTK/NiftyNet
Commit Name: c8b28432a637a780eed96547260722ff3dede57e
Time: 2017-10-04
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/sampler_selective.py
Class Name:
Method Name: rand_choice_coordinates
Project Name: onnx/onnx-tensorflow
Commit Name: 6dad4c27ab4ffa96e0b699b8d5925fbe2a1f9d38
Time: 2020-10-22
Author: pluradj@us.ibm.com
File Name: onnx_tf/handlers/backend/upsample.py
Class Name: Upsample
Method Name: version_7
Project Name: tryolabs/luminoth
Commit Name: d9b88cf9528f6f5e17d34fefc29c506bd9a43005
Time: 2017-09-01
Author: iangtayler@gmail.com
File Name: luminoth/models/fasterrcnn/rcnn_target_test.py
Class Name: RCNNTargetTest
Method Name: testAbsolutelyEmptyCase