-
Notifications
You must be signed in to change notification settings - Fork 0
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
Message improvements (properties and methods). #124
Conversation
Test Results125 tests 125 ✅ 1s ⏱️ Results for commit c90782e. ♻️ This comment has been updated with latest results. |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The added features seem useful! I'm wondering, though, if we are not making the messages too complicated for DAI to implement natively (e.g. for bbox-related methods, wouldn't it be much easier for DAI to have such transformations done on-host?)
Good question but IIRC Matevz said that we can add functions to msgs with no problem. |
This PR improves 3 messages:
Predictions
msg - we add a propertyprediction
for retrieving first prediction value. This is useful because Regression parser many times returns one value and to get the value we must typemessage.predictions[0].prediction
. Now, we will just writemessage.prediction
.Classification
msg - same idea as with Predictions msg. to get the most probable class and score we add two properties:top_class
andtop_score
.ImgDetectionExtended
msg - two methods are added for easy conversion to [x1,y1,x2,y2] bbox and for [[x1,y1], [x2,y2],[x3,y3],[x4,y4]] rotated bbox (going from the top-left and clockwise)