import tensorflow as tf


                                    if cfgs.ANGLE_RANGE == 180:
                                        gtboxes_and_label_r_ = tf.py_func(coordinate_present_convert,
                                                                          inp=[gtboxes_and_label_r, -1],
                                                                          Tout=tf.float32)
                                        gtboxes_and_label_r_ = tf.reshape(gtboxes_and_label_r_, [-1, 6])

                                        gt_encode_label = tf.py_func(angle_label_encode,
                                                                     inp=[gtboxes_and_label_r_[:, -2], cfgs.ANGLE_RANGE,
                                                                          cfgs.OMEGA, cfgs.ANGLE_MODE],
                                                                     Tout=tf.float32)
                                    else:
                                        gt_encode_label = tf.py_func(angle_label_encode,
                                                                     inp=[gtboxes_and_label_r[:, -2], cfgs.ANGLE_RANGE,
                                                                          cfgs.OMEGA, cfgs.ANGLE_MODE],
                                                                     Tout=tf.float32)

                                    img = inputs_list[i][0]
                                    img_shape = inputs_list[i][-2:]
                                    img = tf.image.crop_to_bounding_box(image=img,
                                                                        offset_height=0,
                                                                        offset_width=0,
                                                                        target_height=tf.cast(img_shape[0], tf.int32),
                                                                        target_width=tf.cast(img_shape[1], tf.int32))
