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
ImageProcessingOptions package is not correct in docs #5283
Comments
If anybody knows what package this is in please let me know, it's currently blocking some development. I also hand-wavily tried |
I found it in Also Package names need to be correctly identified in the Python API documentation. The docs are full of nonexistent packages. |
Adding the following code to https://github.com/google/mediapipe/blob/master/mediapipe/tasks/python/vision/__init__.py should fix it most likely: ImageProcessingOptions = core.image_processing_options.ImageProcessingOptions
del holistic_landmarker |
If you take the fully-qualified class from that URL, it exists: $ pip install mediapipe
...
$ python
>>> import mediapipe as mp
>>> mp.__version__
'0.10.11'
>>> mp.tasks.vision.holistic_landmarker.image_processing_options_module.ImageProcessingOptions()
ImageProcessingOptions(region_of_interest=None, rotation_degrees=0)
>>> mp.tasks.vision.holistic_landmarker.image_processing_options_module
<module 'mediapipe.tasks.python.vision.core.image_processing_options' from '/tmp/mp/lib/python3.11/site-packages/mediapipe/tasks/python/vision/core/image_processing_options.py'>
This looks like the path from the source directory, not the
This is the same. If you use the namespace from the docs directly in Python, you'll get the module you expect. Are you testing this via the Python CLI from within the Mediapipe repo? Or are you installing the package through Or is the concern that you are unable to find the Mediapipe source from an API symbol? Each page on the API ref should have a link to GitHub at the top where you can find the file. You can call |
Hi @JC3, Could you kindly review the above comments? Thank you!! |
@kuaashish It is not a matter of just fixing the code. My remark that the docs are full of nonexistent packages stands. I ran a test and attempted to import every package identified in the documentation. Of the 90 packages/modules identified, only 36 exist. Packages identified with
This was generated and tested with some Python scripts I hacked together: mpgenimp.tgz As you can see, it is a bigger, general documentation issue. This is mediapipe 0.10.9, installed with |
Hi @markmcd, Could you please reexamine this issue? Thank you!! |
That's not the right solution. It also doesn't fix the missing |
@kuaashish As for the remaining issues in the API docs I believe these imports are necessary too. PTAL. Issue: Unused and internal text core module: https://developers.google.com/mediapipe/api/solutions/python/mp/tasks/text/core """MediaPipe Tasks Text API."""
import mediapipe.tasks.python.text.core
# Remove unnecessary modules to avoid duplication in API docs.
del core Issue: Wrong keypoint module: https://developers.google.com/mediapipe/api/solutions/python/mp/tasks/components/containers/keypoint """MediaPipe Tasks Components Containers API."""
import mediapipe.tasks.python.components.containers.keypoint
NormalizedKeypoint = keypoint.NormalizedKeypoint
# Remove unnecessary modules to avoid duplication in API docs.
del keypoint Issue: Improper utils module https://developers.google.com/mediapipe/api/solutions/python/mp/tasks/components/utils/cosine_similarity import mediapipe.tasks.python.components.utils.cosine_similarity
cosine_similarity = cosine_similarity.cosine_similarity
# Remove unnecessary modules to avoid duplication in API docs.
del cosine_similarity
del mediapipe |
I agree. Thank you for adding more finding here. We should address this issue promptly in our API documentation. |
Description of issue (what needs changing)
Whatever package
ImageProcessingOptions
is in is not documented correctly.Clear description
https://developers.google.com/mediapipe/api/solutions/python/mp/tasks/vision/holistic_landmarker/image_processing_options_module/ImageProcessingOptions shows that
ImageProcessingOptions
is inmediapipe.tasks.vision.holistic_landmarker.image_processing_options_module
but this package does not exist. I have no idea where this class is exported from.Correct links
No response
Parameters defined
No response
Returns defined
No response
Raises listed and defined
No response
Usage example
No response
Request visuals, if applicable
No response
Submit a pull request?
No response
The text was updated successfully, but these errors were encountered: