Member 14429705 Ответов: 1

Я не могу запустить код одной из ваших статей пожалуйста помогите мне запустить код


https://www.codeproject.com/Articles/3993967/Applying-Long-Short-Term-Memory-for-Video-Classifi
Применение долговременной кратковременной памяти для задач классификации видео
код github дан, и я не могу запустить код, Пожалуйста, помогите мне в этом вопросе.
Ссылка на код
https://github.com/SBoyNumber1/LSTM-video-classification


Apriorit Inc, Семен Бойко, пожалуйста, ответьте на мой запрос

Что я уже пробовал:

Я сделал набор данных кода в правильной структуре, приведенной на веб-сайте. Пожалуйста, помогите мне запустить код. При запуске кода ниже были показаны ошибки. Я не в состоянии понять, что представление sys.argv-это делают в коде. Пожалуйста

runfile('C:/Users/Dell/Desktop/LSTM-video-classification-master/data/extract_files.py', wdir='C:/Users/Dell/Desktop/LSTM-video-classification-master/data')
Generated 91 frames for Commercial_train_0
Generated 91 frames for Commercial_train_1
Generated 91 frames for Commercial_train_10
Generated 91 frames for Commercial_train_11
Generated 91 frames for Commercial_train_12
Generated 91 frames for Commercial_train_13
Generated 91 frames for Commercial_train_2
Generated 91 frames for Commercial_train_3
Generated 89 frames for Commercial_train_4
Generated 91 frames for Commercial_train_5
Generated 91 frames for Commercial_train_6
Generated 91 frames for Commercial_train_7
Generated 89 frames for Commercial_train_8
Generated 89 frames for Commercial_train_9
Generated 90 frames for News_train_1_0
Generated 91 frames for News_train_1_12
Generated 91 frames for News_train_1_15
Generated 91 frames for News_train_1_18
Generated 89 frames for News_train_1_21
Generated 89 frames for News_train_1_24
Generated 91 frames for News_train_1_27
Generated 91 frames for News_train_1_3
Generated 89 frames for News_train_1_30
Generated 91 frames for News_train_1_33
Generated 90 frames for News_train_1_36
Generated 91 frames for News_train_1_39
Generated 91 frames for News_train_1_42
Generated 90 frames for News_train_1_45
Generated 91 frames for News_train_1_48
Generated 89 frames for News_train_1_51
Generated 90 frames for News_train_1_54
Generated 91 frames for News_train_1_57
Generated 90 frames for News_train_1_6
Generated 91 frames for News_train_1_9
Generated 91 frames for News_train_2_0
Generated 91 frames for News_train_2_12
Generated 91 frames for News_train_2_15
Generated 91 frames for News_train_2_18
Generated 91 frames for News_train_2_21
Generated 91 frames for News_train_2_24
Generated 91 frames for News_train_2_27
Generated 91 frames for News_train_2_3
Generated 89 frames for News_train_2_30
Generated 89 frames for News_train_2_33
Generated 91 frames for News_train_2_36
Generated 90 frames for News_train_2_39
Generated 91 frames for News_train_2_42
Generated 91 frames for News_train_2_45
Generated 89 frames for News_train_2_48
Generated 91 frames for News_train_2_51
Generated 90 frames for News_train_2_54
Generated 91 frames for News_train_2_57
Generated 91 frames for News_train_2_6
Generated 89 frames for News_train_2_9
Generated 91 frames for News_train_3_0
Generated 91 frames for News_train_3_12
Generated 91 frames for News_train_3_15
Generated 90 frames for News_train_3_18
Generated 91 frames for News_train_3_21
Generated 91 frames for News_train_3_24
Generated 91 frames for News_train_3_27
Generated 91 frames for News_train_3_3
Generated 89 frames for News_train_3_30
Generated 91 frames for News_train_3_33
Generated 91 frames for News_train_3_36
Generated 91 frames for News_train_3_39
Generated 91 frames for News_train_3_42
Generated 91 frames for News_train_3_45
Generated 91 frames for News_train_3_6
Generated 91 frames for News_train_3_9
Generated 91 frames for Commercial_test_0
Generated 91 frames for Commercial_test_1
Generated 91 frames for Commercial_test_2
Generated 91 frames for Commercial_test_3
Generated 91 frames for Commercial_test_4
Generated 89 frames for Commercial_test_5
Generated 90 frames for News_train_3_48
Generated 91 frames for News_train_3_51
Generated 89 frames for News_train_3_54
Generated 89 frames for News_train_3_57
Generated 91 frames for News_train_4_0
Generated 91 frames for News_train_4_12
Generated 91 frames for News_train_4_15
Generated 91 frames for News_train_4_18
Generated 91 frames for News_train_4_21
Generated 91 frames for News_train_4_24
Generated 91 frames for News_train_4_27
Generated 91 frames for News_train_4_3
Generated 91 frames for News_train_4_30
Generated 91 frames for News_train_4_33
Generated 91 frames for News_train_4_36
Generated 91 frames for News_train_4_39
Generated 89 frames for News_train_4_42
Generated 91 frames for News_train_4_45
Generated 91 frames for News_train_4_48
Generated 89 frames for News_train_4_51
Generated 89 frames for News_train_4_54
Generated 89 frames for News_train_4_57
Generated 91 frames for News_train_4_6
Generated 91 frames for News_train_4_9
Extracted and wrote 100 video files.
Usage: python extract_filese.py [videos extession]
Example: python extract_files.py mp4

runfile('C:/Users/Dell/Desktop/LSTM-video-classification-master/data.py', wdir='C:/Users/Dell/Desktop/LSTM-video-classification-master')



runfile('C:/Users/Dell/Desktop/LSTM-video-classification-master/train.py', wdir='C:/Users/Dell/Desktop/LSTM-video-classification-master')
Reloaded modules: processor
Usage: python train.py sequence_length class_limit image_height image_width
Example: python train.py 75 2 720 1280
Traceback (most recent call last):

  File "<ipython-input-19-091ab9c812f8>", line 1, in <module>
    runfile('C:/Users/Dell/Desktop/LSTM-video-classification-master/train.py', wdir='C:/Users/Dell/Desktop/LSTM-video-classification-master')

  File "D:\Users\Dell\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile
    execfile(filename, namespace)

  File "D:\Users\Dell\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/Users/Dell/Desktop/LSTM-video-classification-master/train.py", line 125, in <module>
    main()

  File "C:/Users/Dell/Desktop/LSTM-video-classification-master/train.py", line 119, in main
    extract_features(seq_length=seq_length, class_limit=class_limit, image_shape=image_shape)

  File "C:\Users\Dell\Desktop\LSTM-video-classification-master\extract_features.py", line 20, in extract_features
    data = DataSet(seq_length=seq_length, class_limit=class_limit, image_shape=image_shape)

  File "C:\Users\Dell\Desktop\LSTM-video-classification-master\data.py", line 50, in __init__
    self.classes = self.get_classes()

  File "C:\Users\Dell\Desktop\LSTM-video-classification-master\data.py", line 82, in get_classes
    if item[1] not in classes:

IndexError: list index out of range





runfile('C:/Users/Dell/Desktop/LSTM-video-classification-master/train.py', wdir='C:/Users/Dell/Desktop/LSTM-video-classification-master')
Reloaded modules: models, data, processor, extract_features, extractor
Traceback (most recent call last):

  File "<ipython-input-22-091ab9c812f8>", line 1, in <module>
    runfile('C:/Users/Dell/Desktop/LSTM-video-classification-master/train.py', wdir='C:/Users/Dell/Desktop/LSTM-video-classification-master')

  File "D:\Users\Dell\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile
    execfile(filename, namespace)

  File "D:\Users\Dell\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/Users/Dell/Desktop/LSTM-video-classification-master/train.py", line 129, in <module>
    main()

  File "C:/Users/Dell/Desktop/LSTM-video-classification-master/train.py", line 123, in main
    extract_features(seq_length=seq_length, class_limit=class_limit, image_shape=image_shape)

  File "C:\Users\Dell\Desktop\LSTM-video-classification-master\extract_features.py", line 20, in extract_features
    data = DataSet(seq_length=seq_length, class_limit=class_limit, image_shape=image_shape)

  File "C:\Users\Dell\Desktop\LSTM-video-classification-master\data.py", line 50, in __init__
    self.classes = self.get_classes()

  File "C:\Users\Dell\Desktop\LSTM-video-classification-master\data.py", line 82, in get_classes
    if item[1] not in classes:

IndexError: list index out of range

Mohibur Rashid

о чьей статье вы говорите? можете ли вы сделать комментарий в этой статье? так что ОП статьи может ответить вам прямо.

Member 14429705

Я дал ссылку прямо сейчас, пожалуйста, взгляните на нее, это будет хорошо для меня, если вы сможете мне помочь.

Member 14429705

скопируйте и вставьте ссылку в свой браузер

1 Ответов

Рейтинг:
0

Patrice T

Лучший способ связаться с автором-это воспользоваться форумом в нижней части статьи:
Применение долговременной кратковременной памяти для задач классификации видео[^]