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

Image rotation action, usable in chains #677

Merged
merged 4 commits into from Jan 24, 2020
Merged

Image rotation action, usable in chains #677

merged 4 commits into from Jan 24, 2020

Conversation

beniz
Copy link
Collaborator

@beniz beniz commented Dec 18, 2019

Image rotation action, typically useful prior to an OCR model that requires an element with text is correctly rotated.

The rotate action is to be used as follows:

  • within a chain:
{                                                                                                     
                 "action": {                                                                                          
                     "type": "rotate"                                                                                 
                 }                                                                                                    
}
  • action takes the output label of a classifier model that must be one of the following strings: ["0","90","180","270"] as the rotation angle in degrees. The output of the action is then the image (or object crop depending on the chain) rotated by the angle predicted by the model.

  • action has parameter orientation with values as "relative" (default) or "absolute":

    • "relative": the output orientation label yields the image/crop orientation, e.g. 90, and must be corrected relative to this value in order to get rotate to 0, e.g. with -90 = 270 rotation.
    • "absolute": the output orientation is the command to the rotation to be applied.

@beniz beniz merged commit 293f5b3 into master Jan 24, 2020
@beniz beniz deleted the rotate_action branch April 22, 2020 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants