Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Not able to reproduce the stage two models

Abierto
#304 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
opencv, python, pytorch

Línea de trabajo

Ejecuta la reproducción proporcionada con demo/example1.mp4 y, después, inspecciona demo/internvideo2_stage2_config.py, demo_config.Config.from_file y demo.utils.setup_internvideo2. Comprueba cómo se cargan el checkpoint, los pesos y el tamaño del vocabulario de la segunda etapa, y compara las probabilidades reportadas de las cinco mejores opciones. Se considera terminado cuando se haya identificado si la carga causa los malos resultados de transferencia y se hayan documentado hallazgos reproducibles o una corrección confirmada.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

during model loading the check points weight and vocab size seems to be wrong
below is the code I used to generate this result, which has also been mentioned by others, I also tried clip and other models, the reuslts seems to be pretty bad when transferring to other dataset

text: A man in a gray sweater plays fetch with his dog in the snowy yard, throwing a toy and watching it run. ~ prob: 0.6796
text: A man in a gray hat and coat walks through the snowy yard, carefully navigating around the trees. ~ prob: 0.0944
text: A person dressed in a blue jacket shovels the snow-covered pavement outside their house. ~ prob: 0.0754
text: A person stands on the snowy floor, pushing a sled loaded with blankets, preparing for a fun-filled ride. ~ prob: 0.0375
text: A playful dog slides down a snowy hill, wagging its tail with delight. ~ prob: 0.0288

Looking for your guidance.

`import numpy as np
import os
import io
import cv2
os.environ['CUDA_LAUNCH_BLOCKING']='1'
import torch

from demo_config import (Config,
eval_dict_leaf)

from demo.utils import (retrieve_text,
_frame_from_video,
setup_internvideo2)
seed = 4491734
print("Seed:", seed)

np.random.seed(seed)
torch.manual_seed(seed)
if torch.cuda.is_available():
torch.cuda.manual_seed_all(seed)
video = cv2.VideoCapture('demo/example1.mp4')
frames = [x for x in _frame_from_video(video)]
text_candidates = ["A playful dog and its owner wrestle in the snowy yard, chasing each other with joyous abandon.",
"A man in a gray coat walks through the snowy landscape, pulling a sleigh loaded with toys.",
"A person dressed in a blue jacket shovels the snow-covered pavement outside their house.",
"A pet dog excitedly runs through the snowy yard, chasing a toy thrown by its owner.",
"A person stands on the snowy floor, pushing a sled loaded with blankets, preparing for a fun-filled ride.",
"A man in a gray hat and coat walks through the snowy yard, carefully navigating around the trees.",
"A playful dog slides down a snowy hill, wagging its tail with delight.",
"A person in a blue jacket walks their pet on a leash, enjoying a peaceful winter walk among the trees.",
"A man in a gray sweater plays fetch with his dog in the snowy yard, throwing a toy and watching it run.",
"A person bundled up in a blanket walks through the snowy landscape, enjoying the serene winter scenery."]
#%%
config = Config.from_file('demo/internvideo2_stage2_config.py')
config = eval_dict_leaf(config)
#%%

config['pretrained_path'] = '/InternVideo/InternVideo2/multi_modality/weights/InternVideo2-stage2_1b-224p-f4.pt',

intern_model, tokenizer = setup_internvideo2(config)
#%%
texts, probs = retrieve_text(frames, text_candidates, model=intern_model.eval(), topk=5, config=config)

for t, p in zip(texts, probs):
print(f'text: {t} ~ prob: {p:.4f}')`

Lenguaje dominante
Python
Estrellas
2.4k
Forks
160
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de OpenGVLab/InternVideo

Todos los issues de OpenGVLab/InternVideo

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.