-
Notifications
You must be signed in to change notification settings - Fork 8
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
3D algorithms benchmark script added #13
base: develop
Are you sure you want to change the base?
Conversation
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`") |
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.
Please use Version
for it: https://stackoverflow.com/questions/11887762/how-do-i-compare-version-numbers-in-python
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) |
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.
why *0.5
?
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.
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) |
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.
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) |
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.
Looks like we need to add it to OpenCV as API.
# Script to download Scanned Objects by Google Research dataset and Stanford models | ||
# Distributed by CC-BY 4.0 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.
Please extract Google owned code as dedicated file with own license header.
This PR changes
Adding a script that downloads models from a specific dataset, runs several 3D algorithms on it and calculates accuracy.
TODO:
triangleRasterize()
: assign vertex color based on a color from a texture