ravens/dataset.py
def _change_name(self, suff, info_extra):
        """Depending on the env, make changes to image suffix `suff`."""
        if 'cable-ring' in self.path:
            i1 = info_extra['convex_hull_area']
            i2 = info_extra['best_possible_area']
            f = i1 / i2
            suff = suff.replace('.png',
                    f'-area-{i1:0.3f}-best-{i2:0.3f}-FRAC-{f:0.3f}.png')
        elif 'cloth-flat' in self.path:
            i1 = info_extra['cloth_coverage']
            suff = suff.replace('.png', f'-coverage-{i1:0.3f}.png')
        elif 'bag-alone' in self.path:
            i1 = info_extra['convex_hull_area']
            i2 = info_extra['best_possible_area']
            suff = suff.replace('.png', f'-area-{i1:0.3f}-best-{i2:0.3f}.png')
        else:
            pass
        return suff
Depending on the env, make changes to image suffix `suff`.
Depending on the env, make changes to image suffix `suff`.
Depending on the env make changes to image suffix ` suff ` .
def _change_name(self, suff, info_extra):
        if 'cable-ring' in self.path:
            i1 = info_extra['convex_hull_area']
            i2 = info_extra['best_possible_area']
            f = i1 / i2
            suff = suff.replace('.png',
                    f'-area-{i1:0.3f}-best-{i2:0.3f}-FRAC-{f:0.3f}.png')
        elif 'cloth-flat' in self.path:
            i1 = info_extra['cloth_coverage']
            suff = suff.replace('.png', f'-coverage-{i1:0.3f}.png')
        elif 'bag-alone' in self.path:
            i1 = info_extra['convex_hull_area']
            i2 = info_extra['best_possible_area']
            suff = suff.replace('.png', f'-area-{i1:0.3f}-best-{i2:0.3f}.png')
        else:
            pass
        return suff
def _change_name ( self , suff , info_extra ) : if 'cable-ring' in self . path : i1 = info_extra [ 'convex_hull_area' ] i2 = info_extra [ 'best_possible_area' ] f = i1 / i2 suff = suff . replace ( '.png' , f'-area-{i1:0.3f}-best-{i2:0.3f}-FRAC-{f:0.3f}.png' ) elif 'cloth-flat' in self . path : i1 = info_extra [ 'cloth_coverage' ] suff = suff . replace ( '.png' , f'-coverage-{i1:0.3f}.png' ) elif 'bag-alone' in self . path : i1 = info_extra [ 'convex_hull_area' ] i2 = info_extra [ 'best_possible_area' ] suff = suff . replace ( '.png' , f'-area-{i1:0.3f}-best-{i2:0.3f}.png' ) else : pass return suff
Depending on the env, make changes to image suffix `suff`.
Depending on the env make changes to image suffix ` suff ` .
"""Depending on the env, make changes to image suffix `suff`."""
self
suff
info_extra