Error API Cloud Video Intelligence - Requested model could not be loaded
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 28/100
- Tipo de issue
- Documentación
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- cloud, documentation
Línea de trabajo
Comienza con test.py y la documentación enlazada sobre la clasificación de vídeos en streaming de Video Intelligence; después, revisa el ejemplo de StreamingVideoIntelligenceServiceClient y su configuración del modelo. Reproduce la respuesta 'Requested model could not be loaded' y verifica los requisitos documentados para el modelo AutoML y el endpoint. Se considera terminado cuando el ejemplo y la documentación indiquen claramente la configuración necesaria o corrijan el uso mostrado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
In which file did you encounter the issue?
import io
from google.cloud import videointelligence_v1p3beta1 as videointelligence
# path = 'path_to_file'
# project_id = 'gcp_project_id'
# model_id = 'automl_classification_model_id'
client = videointelligence.StreamingVideoIntelligenceServiceClient()
model_path = "projects/{}/locations/us-central1/models/{}".format(
project_id, model_id
)
# Here we use classification as an example.
automl_config = videointelligence.StreamingAutomlClassificationConfig(
model_name=model_path
)
video_config = videointelligence.StreamingVideoConfig(
feature=videointelligence.StreamingFeature.STREAMING_AUTOML_CLASSIFICATION,
automl_classification_config=automl_config,
)
# config_request should be the first in the stream of requests.
config_request = videointelligence.StreamingAnnotateVideoRequest(
video_config=video_config
)
# Set the chunk size to 5MB (recommended less than 10MB).
chunk_size = 5 * 1024 * 1024
# Load file content.
# Note: Input videos must have supported video codecs. See
# https://cloud.google.com/video-intelligence/docs/streaming/streaming#supported_video_codecs
# for more details.
stream = []
with io.open(path, "rb") as video_file:
while True:
data = video_file.read(chunk_size)
if not data:
break
stream.append(data)
def stream_generator():
yield config_request
for chunk in stream:
yield videointelligence.StreamingAnnotateVideoRequest(input_content=chunk)
requests = stream_generator()
# streaming_annotate_video returns a generator.
# The default timeout is about 300 seconds.
# To process longer videos it should be set to
# larger than the length (in seconds) of the stream.
responses = client.streaming_annotate_video(requests, timeout=600)
for response in responses:
# Check for errors.
if response.error.message:
print(response.error.message)
break
for label in response.annotation_results.label_annotations:
for frame in label.frames:
print(
"At {:3d}s segment, {:5.1%} {}".format(
frame.time_offset.seconds,
frame.confidence,
label.entity.entity_id,
)
)
Describe the issue
https://cloud.google.com/video-intelligence/docs/streaming/video-classification
I am conducting a series of tests on AutoML, using the code provided in the official documentation, and I am encountering an issue. After training the model with VortexAI, completing the process, and retrieving the Model ID, the Python APIs consistently return 'Requested model could not be loaded.' Honestly, the demos are poorly written, and the exceptions in the code are very implicit. Some demos don't work, and you have to make corrections in certain areas to get them to function properly.
python3 ./test.py
"Requested model could not be loaded."
The model was specifically trained for Video Intelligence in the VortexAI section and, in turn, did not function correctly. In the documentation, it's not clear whether the model necessarily requires an Endpoint. Both the code and the documentation have a comprehension issue.
- Lenguaje dominante
- Jupyter Notebook
- Estrellas
- 8.1k
- Forks
- 6.7k
- Merge medio
- 4 d 4 h
- PR fusionados (30 d)
- 8
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de GoogleCloudPlatform/python-docs-samples
-
samples
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
samples
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
-
samples
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
samples
GoogleCloudPlatform/python-docs-samples#14117 · 1 asignado ·
-
samples
GoogleCloudPlatform/python-docs-samples#14091 · 1 asignado ·
Todos los issues de GoogleCloudPlatform/python-docs-samples
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
splunk/security_content#4292 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
area-deployment area-integrations triage:bot-seen
Dificultad 2/5 Medio día Aptitud para principiantes 86/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100