Azure-Samples / Azure-Samples/document-intelligence-code-samples

Layout Model: Extract images from within images

Aberta
#116 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
C#
Estrelas
201
Forks
115
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

I have extracted images ("figures") with the Layout model successfully, but within some images there are some nested images like in this example:

Image

The pink frame surrounds a detected image but within that image, there is another image (the green leaves symbol) that is not detected by the Layout model.

The respective code example also knows just one "hierarchy" and it seems it only detects the "outer" image but not the Inner" image (i.e. the greens leave pic):

```
if result.figures:
for figures_idx,figures in enumerate(result.figures):
print(f"Figure # {figures_idx} has the following spans:{figures.spans}")
for region in figures.bounding_regions:
print(f"Figure # {figures_idx} location on page:{region.page_number} is within bounding polygon '{region.polygon}'")
```

I would like to extract the green leaves image inside the "outer" image as well.

Is that possible?

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.