Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

3D algorithms benchmark script added#13

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
savuor wants to merge17 commits intoopencv:develop
base:develop
Choose a base branch
Loading
fromsavuor:rv/bench_3d

Conversation

@savuor
Copy link

@savuorsavuor commentedMar 28, 2024
edited
Loading

This PR changes

Adding a script that downloads models from a specific dataset, runs several 3D algorithms on it and calculates accuracy.

TODO:

  • Point cloud generation: subsample triangles in proportion to overall surface area
  • Colored mesh generation fortriangleRasterize(): assign vertex color based on a color from a texture
  • Collecting stats
  • More camera poses
  • Correctly process Stanford files (w/o textures)
  • No hardcoded filenames, better argument processing

@savuorsavuor marked this pull request as ready for reviewApril 16, 2024 03:25
Comment on lines +21 to +22
if sys.version_info[0] < 3 or sys.version_info[1] < 5:
raise Exception("Python 3.5 or greater is required. Try running `python3 download_collection.py`")
Copy link
Contributor

Choose a reason for hiding this comment

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

normL2Rgb = np.linalg.norm(colorDiff, ord=2) / (width * height)
print("rgb L2: %f Inf: %f" % (normL2Rgb, normInfRgb))

cv.imwrite(color_diff_path, (colorDiff.reshape((height, width, 3)) + 1) * 0.5 * 255.0)
Copy link
Contributor

Choose a reason for hiding this comment

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

why*0.5?

Copy link
Author

Choose a reason for hiding this comment

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

because difference range is 2x bigger than value range

colorGl = colorGl.astype(np.float32) * (1.0/255.0)
colorDiff = np.ravel(colorGl - colorRasterize)
normInfRgb = np.linalg.norm(colorDiff, ord=np.inf)
normL2Rgb = np.linalg.norm(colorDiff, ord=2) / (width * height)
Copy link
Contributor

Choose a reason for hiding this comment

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

I propose to report min/max/average, but not only value normalized on pixel count. In case if the scene is sparse and most of pixels are background the current value is not informative.

position = np.array([0.0, 0.0, zat], dtype=np.float32)
lookat = np.array([0.0, 0.0, 0.0], dtype=np.float32)
upVector = np.array([0.0, 1.0, 0.0], dtype=np.float32)
cameraPose = lookAtMatrixCal(position, lookat, upVector)
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like we need to add it to OpenCV as API.

Comment on lines +1 to +2
# Script to download Scanned Objects by Google Research dataset and Stanford models
# Distributed by CC-BY 4.0 License
Copy link
Contributor

Choose a reason for hiding this comment

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

Please extract Google owned code as dedicated file with own license header.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@asmorkalovasmorkalovasmorkalov left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@savuor@asmorkalov

[8]ページ先頭

©2009-2025 Movatter.jp