sony / model_optimization

Model Compression Toolkit (MCT) is an open source project for neural network model optimization under efficient, constrained hardware. This project provides researchers, developers, and engineers advanced quantization and compression tools for deploying state-of-the-art neural networks.
https://sony.github.io/model_optimization/
Apache License 2.0
332 stars 53 forks source link

SSI-DNN/keras_yolov8n_640x640 model not found #1259

Closed Tiffanyxk3 closed 2 weeks ago

Tiffanyxk3 commented 3 weeks ago

Issue Type

Bug

Source

pip (model-compression-toolkit)

MCT Version

2.2.0

OS Platform and Distribution

MacOS 13.2.1

Python version

3.11.5

Describe the issue

Running example_keras_yolov8n.ipynb:

from huggingface_hub import from_pretrained_keras
model = from_pretrained_keras('SSI-DNN/keras_yolov8n_640x640')

Got this error:

Repository Not Found for url: https://huggingface.co/api/models/SSI-DNN/keras_yolov8n_640x640/revision/main. Please make sure you specified the correct repo_id and repo_type. If you are trying to access a private or gated repo, make sure you are authenticated. Invalid username or password.

This model is unavailable on Hugging Face.

Expected behaviour

No response

Code to reproduce the issue

from huggingface_hub import from_pretrained_keras
model = from_pretrained_keras('SSI-DNN/keras_yolov8n_640x640')

Log output

---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
File ~/anaconda3/lib/python3.11/site-packages/huggingface_hub/utils/_errors.py:259, in hf_raise_for_status(response, endpoint_name)
    [258](https://file+.vscode-resource.vscode-cdn.net/Users/tiffanyz/Desktop/LeopardImaging/model_optimization-2.2.1/tutorials/notebooks/mct_features_notebooks/keras/~/anaconda3/lib/python3.11/site-packages/huggingface_hub/utils/_errors.py:258) try:
--> [259](https://file+.vscode-resource.vscode-cdn.net/Users/tiffanyz/Desktop/LeopardImaging/model_optimization-2.2.1/tutorials/notebooks/mct_features_notebooks/keras/~/anaconda3/lib/python3.11/site-packages/huggingface_hub/utils/_errors.py:259)     response.raise_for_status()
    [260](https://file+.vscode-resource.vscode-cdn.net/Users/tiffanyz/Desktop/LeopardImaging/model_optimization-2.2.1/tutorials/notebooks/mct_features_notebooks/keras/~/anaconda3/lib/python3.11/site-packages/huggingface_hub/utils/_errors.py:260) except HTTPError as e:

File ~/anaconda3/lib/python3.11/site-packages/requests/models.py:1024, in Response.raise_for_status(self)
   [1023](https://file+.vscode-resource.vscode-cdn.net/Users/tiffanyz/Desktop/LeopardImaging/model_optimization-2.2.1/tutorials/notebooks/mct_features_notebooks/keras/~/anaconda3/lib/python3.11/site-packages/requests/models.py:1023) if http_error_msg:
-> [1024](https://file+.vscode-resource.vscode-cdn.net/Users/tiffanyz/Desktop/LeopardImaging/model_optimization-2.2.1/tutorials/notebooks/mct_features_notebooks/keras/~/anaconda3/lib/python3.11/site-packages/requests/models.py:1024)     raise HTTPError(http_error_msg, response=self)

HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/api/models/SSI-DNN/keras_yolov8n_640x640/revision/main

The above exception was the direct cause of the following exception:

RepositoryNotFoundError                   Traceback (most recent call last)
Cell In[10], [line 5](vscode-notebook-cell:?execution_count=10&line=5)
      [1](vscode-notebook-cell:?execution_count=10&line=1) # !pip install --upgrade bottleneck
      [3](vscode-notebook-cell:?execution_count=10&line=3) from huggingface_hub import from_pretrained_keras
----> [5](vscode-notebook-cell:?execution_count=10&line=5) model = from_pretrained_keras('SSI-DNN/keras_yolov8n_640x640') # Ultralytics/YOLOv8
      [6](vscode-notebook-cell:?execution_count=10&line=6) print(model.summary())

File ~/anaconda3/lib/python3.11/site-packages/huggingface_hub/keras_mixin.py:273, in from_pretrained_keras(*args, **kwargs)
    [217](https://file+.vscode-resource.vscode-cdn.net/Users/tiffanyz/Desktop/LeopardImaging/model_optimization-2.2.1/tutorials/notebooks/mct_features_notebooks/keras/~/anaconda3/lib/python3.11/site-packages/huggingface_hub/keras_mixin.py:217) def from_pretrained_keras(*args, **kwargs) -> "KerasModelHubMixin":
    [218](https://file+.vscode-resource.vscode-cdn.net/Users/tiffanyz/Desktop/LeopardImaging/model_optimization-2.2.1/tutorials/notebooks/mct_features_notebooks/keras/~/anaconda3/lib/python3.11/site-packages/huggingface_hub/keras_mixin.py:218)     r"""
...

Repository Not Found for url: https://huggingface.co/api/models/SSI-DNN/keras_yolov8n_640x640/revision/main.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password.
Idan-BenAmi commented 2 weeks ago

Hi @Tiffanyxk3 , Thank you for your feedback.

To make the deployment process more easy and accessible across a range of tasks, we’re collaborating with Ultralytics to simplify model export. This integration will replace our tutorials and example models you mentioned, offering a much easier way to export Ultralytics models to our device. Additionally, it allows you to re-train the model on your custom dataset before exporting. For more information, please visit IMX500 Export for Ultralytics YOLOv8 - Ultralytics YOLO Docs

Thanks Idan