def get_texture_category(self, imagename: str) -> str:
        """Return texture category from imagename.

        e.g. 'XXX_dog10-bird2.png' -> 'bird '

        Args:
            imagename (str): Name of the image.

        Returns:
            str: Texture category.
        """
        assert type(imagename) is str

        # remove unnecessary words
        a = imagename.split('_')[-1]
        # remove .png etc.
        b = a.split('.')[0]
        # get texture category (last word)
        c = b.split('-')[-1]
        # remove number, e.g. 'bird2' -> 'bird'
        d = ''.join([i for i in c if not i.isdigit()])
        return d
Return texture category from imagename.

        e.g. 'XXX_dog10-bird2.png' -> 'bird '

        Args:
            imagename (str): Name of the image.

        Returns:
            str: Texture category.
        
tools/analysis_tools/utils.py