diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md index 52e44c7..2f34b46 100644 --- a/docs/GETTING_STARTED.md +++ b/docs/GETTING_STARTED.md @@ -45,14 +45,14 @@ And the full feature extraction is updated in [movienet-tools](https://github.co ### Demo #### Preparation -- [pytube](https://github.com/nficano/pytube) is to download YouTube video. Install with ```pip install pytube3 --upgrade``` +- [pytube](https://github.com/nficano/pytube) is to download YouTube video. Install with ```pip install -U pytube``` - FFMPEG is to cut scene video and it is usually installed by your OS #### Run ```sh cd pre python demodownload.py ## Download a YouTube video with pytube -python ShotDetect/shotdetect.py --print_result --save_keyf --save_keyf_txt ## Cut shot +python ShotDetection/shotdetect.py --print_result --save_keyf --save_keyf_txt ## Cut shot cd ../lgss python run.py config/demo.py ## Cut scene ``` diff --git a/docs/requirements.txt b/docs/requirements.txt index 41d26e7..eddc4ec 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,4 @@ tqdm -mmcv \ No newline at end of file +mmcv-full +tensorboardX +scikit-learn \ No newline at end of file diff --git a/lgss/config/demo.py b/lgss/config/demo.py index 4b24295..10ca509 100644 --- a/lgss/config/demo.py +++ b/lgss/config/demo.py @@ -11,12 +11,12 @@ video_name = "demo" shot_num = 4 # even seq_len = 10 # even -gpus = "0,1,2,3,4,5,6,7" +gpus = "0" # dataset settings dataset = dict( name="demo", - mode=['image'], + mode=['image', 'place'], ) # model settings model = dict( @@ -39,7 +39,7 @@ resume = None trainFlag = False testFlag = True -batch_size = 16 +batch_size = 4 epochs = 30 logger = dict(log_interval=200, logs_dir="../run/{}".format(experiment_name)) data_loader_kwargs = dict(num_workers=32, pin_memory=True, drop_last=False) diff --git a/lgss/run.py b/lgss/run.py index 85876f4..3b30523 100644 --- a/lgss/run.py +++ b/lgss/run.py @@ -1,6 +1,6 @@ from __future__ import print_function -from mmcv import Config +from mmengine import Config from tensorboardX import SummaryWriter import src.models as models diff --git a/pre/demodownload.py b/pre/demodownload.py index 7e387b0..620f8a2 100644 --- a/pre/demodownload.py +++ b/pre/demodownload.py @@ -9,7 +9,7 @@ def main(): os.makedirs("../data/demo", exist_ok = True) os.makedirs("../data/demo/video", exist_ok = True) video_save_path = "../data/demo/video" - yt = YouTube('https://www.youtube.com/watch?v=rT22nYLaVbo') + yt = YouTube('https://www.youtube.com/watch?v=9Puz_zu3O3g') yt.streams.get_highest_resolution().download(video_save_path) shutil.move(osp.join(video_save_path,os.listdir(video_save_path)[0]),osp.join(video_save_path,"demo.mp4")) diff --git a/pre/place/extract_feat.py b/pre/place/extract_feat.py index 7d07fb7..36d4a31 100644 --- a/pre/place/extract_feat.py +++ b/pre/place/extract_feat.py @@ -230,7 +230,7 @@ def main(args): if __name__ == '__main__': - data_root = "data/demo" + data_root = "../data/demo" parser = argparse.ArgumentParser("Place feature using ResNet50 with ImageNet pretrain") parser.add_argument('--save-one-frame-feat', action="store_true") parser.add_argument('-b', '--batch-size', type=int, default=512)