Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) Face Detector and OCR Extractor UDFs #303

Merged
merged 9 commits into from
Aug 9, 2022
Merged

(feat) Face Detector and OCR Extractor UDFs #303

merged 9 commits into from
Aug 9, 2022

Conversation

jarulraj
Copy link
Member

@jarulraj jarulraj commented Aug 9, 2022

-- Added UDF and an integration test case

@jarulraj
Copy link
Member Author

jarulraj commented Aug 9, 2022

Do we need labels and input format properties for all UDFs?

@gaurav274
Copy link
Member

No, we don't need them. In fact, we are not yet enforcing the input_format.

@LordDarkula
Copy link
Collaborator

I added defaults for name and input_format in #296

"""

copy = torch.squeeze(frames)
transform = T.ToPILImage()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This converison is wierd. Are we doing it frame by frame?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do it in some other manner?

        pil_image = T.ToPILImage(torch.squeeze(frames))
        bboxes, scores = self.model.detect(img=pil_image)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

model takes in ndarray or PIL image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The concern is that we do a few transformations https://github.com/georgia-tech-db/eva/blob/e6beba4d5da7902108aed3c7fa6b0f366cfd0219/eva/udfs/pytorch_abstract_udf.py#L47
before feeding it to the UDF. (ndarray->PIL->Tensor)
Now inside the UDF, we also repeat those transformations (tensor -> PIL).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to provide a cleaner interface.

@jarulraj jarulraj merged commit 0a79e4c into master Aug 9, 2022
@jarulraj jarulraj deleted the addudfs branch August 9, 2022 17:31
This was referenced Aug 9, 2022
@jarulraj jarulraj changed the title (feat) Face Detector (feat) Face Detector and OCR Extractor UDFs Aug 9, 2022
@jarulraj jarulraj mentioned this pull request Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants