-
Notifications
You must be signed in to change notification settings - Fork 833
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
Add PaddlePaddle Classification notebook #158
Add PaddlePaddle Classification notebook #158
Conversation
On my first try running in an environment where openvino_notebooks requirements were already installed. Here is what I see:
|
It looks like tensorflow 2.5.0 was the problem. I was able to install but now running into this error. I will try clearing out the directory.
|
@ryanloney Sometimes these errors also go away by stopping all kernels (from the Kernel menu). Maybe we should add PaddlePaddle to the requirements.txt. |
I deleted the .paddlehub directory and the notebook works now. I think adding PaddlePaddle to the requirements is a good idea... if you don't think it adds too much footprint? The classification is accurate! Coco is indeed a Labrador retriever (mix) |
It does add up. It is another 500-600MB and we already are at 2,3GB. We may need to reconsider how we install MO requirements in the future and have some optional things. Like how with openvino-dev you can also install openvino-dev[tf2] to just install the MO reqs for tensorflow. But if we do that, it would be good if for the 200-series demos and the POT tutorials we can always include an IR model, so you only need the big frameworks if you actually want to learn how to convert a model from that framework. For now, in my opinion it is better to include it in the requirements than install in the notebook. This also makes our Docker image easier to maintain. If you want to keep it in the install cell for now, I can also do
That's great! I want to do a battle of the frameworks now and compare TensorFlow, PyTorch and PaddlePaddle on MobileNet and Coco classification :-) |
I tried running this notebook on RHODS environment and seeing a permissions issue: This is the full error:
|
Thanks! I'll fix it. Also added Docker tests to tests that are run when a PR is made so we will catch this with CI in the future #176 |
I set HUB_HOME to /tmp to prevent this renaming issue - not ideal, but it works (on my machine). Sadly the docker test does not work yet because it pulls in the notebooks from main. I'll fix that later. |
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.
That should work fine. There is a /tmp in the OpenShift test cluster and users have read/write permission. Thanks for finding the problem!
Tests were failing because of #182, now fixed. I tested the Docker solution manually. |
PaddlePaddle Classification notebook showing classification on MobileNet model from PaddleHub. Model is downloaded, converted to ONNX and IR and inference results are shown. Model source: https://www.paddlepaddle.org.cn/hubdetail?name=mobilenet_v3_large_imagenet_ssld&en_category=ImageClassification
The PaddlePaddle model provides a very useful
.classification()
method that takes a path to an input images and returns a class name. I liked that a lot. But they do quite a bit of preprocessing behind the scenes, and to get the same results, you need to do the same preprocessing. I opted to just import their process_image function in this notebook, and not include mean and std in the MO command to include in the model. I added markdown text to explain that you can do that and how to get the mean and std from the classification model (PaddlePaddle includes that information in the model - really cool!).