Skip to content

Dnn_ Net_ A bug occurred when compiling getUnconnectedOutLayersNames into JavaScript#24458

Merged
asmorkalov merged 6 commits intoopencv:4.xfrom
laolaolulu:4.x
Nov 13, 2023
Merged

Dnn_ Net_ A bug occurred when compiling getUnconnectedOutLayersNames into JavaScript#24458
asmorkalov merged 6 commits intoopencv:4.xfrom
laolaolulu:4.x

Conversation

@laolaolulu
Copy link
Copy Markdown
Contributor

@laolaolulu laolaolulu commented Oct 26, 2023

ret_type = re.sub('(^|[^\w])' + key + '($|[^\w])', type_dict[key], ret_type)
When compiling JavaScript, this code converts vector<std:: string>to vector std:: string
Details: https://laolaolulu.github.io/posts/emscripten-opencv/#opencvjs%E7%BC%96%E8%AF%91getunconnectedoutlayersnames%E8%BF%87%E7%A8%8B%E4%B8%AD%E9%94%99%E8%AF%AF%E5%A4%84%E7%90%86

force_builders=Custom
build_image:Docs=docs-js:18.04
build_image:Custom=javascript
buildworker:Custom=linux-1,linux-4,linux-f1

@asmorkalov
Copy link
Copy Markdown
Contributor

Run cd $HOME/build
Scanning dependencies of target check_flake8
Running flake8
./modules/js/generator/embindgen.py:485:69: E999 TabError: inconsistent use of tabs and spaces in indentation
	    ret_type = re.sub(r"\b" + key + r"\b", type_dict[key], ret_type)
                                                                    ^
1     E999 TabError: inconsistent use of tabs and spaces in indentation
1
make[3]: *** [CMakeFiles/check_flake8.dir/build.make:58: CMakeFiles/check_flake8] Error 1

@laolaolulu laolaolulu closed this Oct 26, 2023
@laolaolulu laolaolulu reopened this Oct 26, 2023
@laolaolulu laolaolulu closed this Oct 26, 2023
@laolaolulu laolaolulu reopened this Oct 26, 2023
@asmorkalov
Copy link
Copy Markdown
Contributor

modules/js/src/core_bindings.cpp:463: trailing whitespace.
+    register_vector<double>("DoubleVector"); 

@laolaolulu laolaolulu closed this Oct 26, 2023
@laolaolulu laolaolulu reopened this Oct 26, 2023
@asmorkalov
Copy link
Copy Markdown
Contributor

@laolaolulu please revert formatting changes. Pure code re-formatting does not bring value, but makes review harder, merge conflicts in 4.x->5.x merges and other issues for maintainers.

@laolaolulu
Copy link
Copy Markdown
Contributor Author

@laolaolulu please revert formatting changes. Pure code re-formatting does not bring value, but makes review harder, merge conflicts in 4.x->5.x merges and other issues for maintainers.

What formatting code plugin should I use for the vscode I am using?

@asmorkalov
Copy link
Copy Markdown
Contributor

Wiki page on coding style and formatting: https://github.com/opencv/opencv/wiki/Coding_Style_Guide
We recommend you the codding style above and .clang-format attached to the wiki page, but for new code only. Please do not touch not relevant pieces.

@laolaolulu laolaolulu closed this Nov 1, 2023
@laolaolulu laolaolulu reopened this Nov 1, 2023
@asmorkalov asmorkalov self-requested a review November 1, 2023 12:13
@asmorkalov asmorkalov added this to the 4.9.0 milestone Nov 1, 2023
Comment on lines +259 to +261
parser.add_argument("-DCMAKE_TOOLCHAIN_FILE", default="", help="DCMAKE_TOOLCHAIN_FILE")
parser.add_argument("-DCMAKE_CROSSCOMPILING_EMULATOR",default="",help="DCMAKE_CROSSCOMPILING_EMULATOR")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new parameters are not used in the script.

Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

Changes in opencv_js.config.py are missing.

Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

👍

@asmorkalov asmorkalov merged commit adc5560 into opencv:4.x Nov 13, 2023
@asmorkalov asmorkalov self-assigned this Nov 13, 2023
IskXCr pushed a commit to Haosonn/opencv that referenced this pull request Dec 20, 2023
* Added JS binding for `getUnconnectedOutLayersNames`
* Fix error: no member named ‘vectorstd’ in namespace ‘std’
thewoz pushed a commit to thewoz/opencv that referenced this pull request Jan 4, 2024
* Added JS binding for `getUnconnectedOutLayersNames`
* Fix error: no member named ‘vectorstd’ in namespace ‘std’
@asmorkalov asmorkalov mentioned this pull request Jan 19, 2024
thewoz pushed a commit to thewoz/opencv that referenced this pull request May 29, 2024
* Added JS binding for `getUnconnectedOutLayersNames`
* Fix error: no member named ‘vectorstd’ in namespace ‘std’
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.

2 participants