Skip to content

Image2description

Image2Description

Source code in Docs2KG/modules/llm/image2description.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
class Image2Description:
    def __init__(self, image_path: Path):
        """
        Extract Semantic Description from Image
        """
        self.image_path = image_path

    def get_image_description(self):
        """
        Get the description of the image

        Read the image, and then pass to the OpenAI API to get the description
        """
        pass

__init__(image_path)

Extract Semantic Description from Image

Source code in Docs2KG/modules/llm/image2description.py
5
6
7
8
9
def __init__(self, image_path: Path):
    """
    Extract Semantic Description from Image
    """
    self.image_path = image_path

get_image_description()

Get the description of the image

Read the image, and then pass to the OpenAI API to get the description

Source code in Docs2KG/modules/llm/image2description.py
11
12
13
14
15
16
17
def get_image_description(self):
    """
    Get the description of the image

    Read the image, and then pass to the OpenAI API to get the description
    """
    pass