-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Datumaro] Add generic accuracy checker model launcher #1661
Conversation
@@ -0,0 +1,116 @@ | |||
|
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.
@eaidova, please, take a look at AC use.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
""" |
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.
@nmanovic, can we put it here?
Pull Request Test Coverage Report for Build 5861
💛 - Coveralls |
@zhiltsov-max could you update documentation and add a couple of examples for non openvino frameworks? |
@azhavoro, here is an example of a pytorch model. I can add examples with other frameworks in another PR. |
@@ -0,0 +1,37 @@ | |||
launcher: |
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.
@azhavoro, the pytorch example.
for label, score, x0, y0, x1, y1 in zip(pred.labels, pred.scores, | ||
pred.x_mins, pred.y_mins, pred.x_maxs, pred.y_maxs) | ||
) | ||
elif isinstance(pred, ac.DepthEstimationPrediction): |
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.
not sure that it is good approach, at least it will require update on each new representation and extend code with a lot of elif statements...
Probably, condition can be converted to dict format where keys are type and value is functor for conversion or something similar.
Another approach which I can suggest to have to_dm_prediction method inside AC prediction, if it is possible (but it will require to update AC code and make AC dependent on DM...now we are working on dep reducion due to necessary to work on ARM...)
so here is something to think about...
Issues:
|
Thanks for the comments.
|
Here is an overview of what got changed by this pull request: Complexity increasing per file
==============================
- datumaro/datumaro/plugins/accuracy_checker_plugin/details/representation.py 9
- datumaro/datumaro/plugins/accuracy_checker_plugin/launcher.py 3
- datumaro/datumaro/plugins/accuracy_checker_plugin/details/ac.py 9
- datumaro/tests/assets/pytorch_launcher/samplenet.py 1
See the complete overview on Codacy |
* Refactor inference wrapper * Add accuracy checker launcher wrapper * t * rename method * Add importer for openvino launcher * Move openvino plugin to iecore * add generic AC launcher * Implement cli for AC launcher * move ac plugin dir * prevent tf reimport * Fix outputs conversion * t * add pytorch model example * Require config path in launcher * Clear extra whitespace
Merge after #1714
Motivation and context
Model support in Datumaro is extended from OpenVINO to OpenVINO, TensorFlow, PyTorch, ONNX, MxNet. Such models now can be used for auto annotation and explainable AI.
How has this been tested?
Manual test
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.