KaiyangZhou / pytorch-vsumm-reinforce

Unsupervised video summarization with deep reinforcement learning (AAAI'18)
MIT License
471 stars 150 forks source link

GoogLe Net implementation #86

Open mdit108 opened 2 years ago

mdit108 commented 2 years ago

In which part of the code is the GoogLe Net as the first part of the DSN specified?

HERIUN commented 2 years ago
from torchvision.models import googlenet
import torch

model = googlenet(pretrained=True)

extractor = torch.nn.Sequential(*list(model.children())[:-2])

im = torch.randn(1,3,720,1280) # NCHW
feature = extractor(im).cpu().numpy().flatten() # [1,1024,1,1] -> [1024]

i try like this...

ruanzhijian commented 1 year ago

I wonder if he is using the pool5 layer of the googlenet network for feature extraction, so is that the code you wrote? Or is there some other additional code.

ehdrndd commented 1 year ago

I wonder if he is using the pool5 layer of the googlenet network for feature extraction, so is that the code you wrote? Or is there some other additional code.

I write the code myself.

ruanzhijian commented 1 year ago

@ehdrndd Can you share your feature extraction code? Or give a link, thanks! You can add a contact if it is convenient

HERIUN commented 1 year ago

@ruanzhijian It may help you.

https://github.com/HERIUN/vsumm-reinforce_re/blob/main/generate_dataset.py