Skip to content

Feat: Implement the face search API endpoint and use it in the UI. #502

@rahulharpal1603

Description

@rahulharpal1603

Feature Description:

Image

This given dialog box pops up when we click on the face icon in the search bar. This is just a UI; no APIs are being called as of now. Also, APIs are not implemented for this. So, you need to finish the tasks given below:

Tasks:

  • Delete the routes/facetagging.py file. That is an old file with wrong code.

  • Create an API endpoint in the file routes/face_clusters.py. The request will contain an image selected from the above dialog box. This endpoint runs the image through the FaceDetector model first. If there are any faces present in the image, we generate embeddings for each face using the FaceNet model. Models can be found in the app/models folder. To see how to use these models, refer to the utils/images.py file.

  • Integrate this API endpoint into the frontend. To see how we make API calls, refer to /frontend/src/pages/PersonImages/PersonImages.tsx. Make sure to follow this convention.

  • Implement Frontend logic for "Upload Photo"

  • Implement frontend logic for "Webcam"

  • The JSX code for the dialog box mentioned above is written in the Navbar.tsx itself. We want to make sure that we are making a separate component for it and using it in the navbar.

  • Make sure to use Redux state management. To display similar images, store the images gotten from the new API endpoint into the src/features/imageSlice.ts state. and display those images in a grid like we are doing it for src/pages/Home.tsx

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions