Handle empty faces in unidentified faces
This commit is contained in:
parent
8177cd336b
commit
72b2a6ad8b
2 changed files with 7 additions and 6 deletions
|
@ -125,11 +125,12 @@ export function UnidentifiedFaces(props: { file: File }) {
|
|||
|
||||
return (
|
||||
<FaceChipContainer>
|
||||
{faceImages.map((faceImage, index) => (
|
||||
<FaceChip key={index}>
|
||||
<ImageBlobView blob={faceImage}></ImageBlobView>
|
||||
</FaceChip>
|
||||
))}
|
||||
{faceImages &&
|
||||
faceImages.map((faceImage, index) => (
|
||||
<FaceChip key={index}>
|
||||
<ImageBlobView blob={faceImage}></ImageBlobView>
|
||||
</FaceChip>
|
||||
))}
|
||||
</FaceChipContainer>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -273,7 +273,7 @@ export async function getUnidentifiedFaces(
|
|||
);
|
||||
|
||||
const faceImages = mlFileData?.faces
|
||||
.filter((f) => f.personId === null || f.personId === undefined)
|
||||
?.filter((f) => f.personId === null || f.personId === undefined)
|
||||
.map((f) => f.faceCrop?.image)
|
||||
.filter((image) => image !== null && image !== undefined);
|
||||
|
||||
|
|
Loading…
Reference in a new issue