Skip to content

Conversation

@zihaomu
Copy link
Member

@zihaomu zihaomu commented Jun 22, 2022

@rogday
Copy link
Member

rogday commented Jun 22, 2022

I think you regenerated the models. Could you use the same data so that we don't have conflicts in the future?

@zihaomu
Copy link
Member Author

zihaomu commented Jun 22, 2022

I think you regenerated the models. Could you use the same data so that we don't have conflicts in the future?

Thanks for your careful checking. It's done.

Copy link
Member

@rogday rogday left a comment

Choose a reason for hiding this comment

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

I trust you just copied and pasted binary files

import google.protobuf.text_format
import io
from typing import Optional

Copy link
Member

Choose a reason for hiding this comment

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

In the master branch there is only one empty line here

Copy link
Member Author

@zihaomu zihaomu Jun 22, 2022

Choose a reason for hiding this comment

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

Thanks. Now I understand, we need to make sure that the bits of PR of the two branches are exactly the same.
Short question, if we encounter the same thing in the future, can we do this via git? rather than manual copying.

Copy link
Member

Choose a reason for hiding this comment

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

Forwarding this question to @alalek

Copy link
Member

Choose a reason for hiding this comment

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

4.6.0 - 2 empty lines: https://github.com/opencv/opencv_extra/blob/4.6.0/testdata/dnn/onnx/generate_onnx_models.py

In the master branch there is only one empty line here

one line is here for the last few hours only: #982


Git works well in one-way. Two-way merging is a mess in general (some changes are just lost).
Proposed patches propagation is 3.4 -> 4.x -> 5.x: https://github.com/opencv/opencv/wiki/Branches
So this is why we need to put code into 3.4 branch first instead of 4.x if it is applicable and needed.
Manual backporting 4.x -> 3.4 is possible, but it is still manual (through git cherry-pick and resolving conflicts).

model_def = assertONNXExpected(onnx_model_pb)
with open(models_files, 'wb') as file:
file.write(model_def.SerializeToString())

Copy link
Member

Choose a reason for hiding this comment

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

and two empty lines instead of one here

Copy link
Member

@rogday rogday left a comment

Choose a reason for hiding this comment

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

👍

@alalek alalek merged commit fdba14b into opencv:3.4 Jun 23, 2022
@alalek alalek mentioned this pull request Jul 26, 2022
This was referenced Aug 14, 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