예제 #1
0
from predictor import ScoringService as ss

if __name__ == '__main__':
    print('Model Load:', ss.get_model())
    print(ss.predict(ss.get_inputs(), '2020-12-30'))
    
예제 #2
0
              Do not include other categories in the prediction you will make.
            - If you do not want to make any prediction in some frames,
              just write "prediction = {}" in the prediction of the frame in the sequence(in line 65 or line 67).
  """

    #評価用の動画データをNo.0〜順番に読み込み
    test_data_path = '../data'
    videos = sorted(glob.glob(test_data_path + '/*.mp4'))

    # 検出したBounding Boxの座標を出力する
    # Output = [name_label, BoxA_X_min, BoxA_X_max, BoxA_Y_min, BoxA_Y_max]
    Output_list = ''
    for i in range(len(videos)):

        video_path = videos[i]
        ScoringService.get_model()
        Output = ScoringService.predict(video_path)
        print(Output)

        if i == 0:  #最初はキーを指定して辞書作成
            Output_list = Output
        else:  #2個目以降はキーを指定して辞書追加
            Output_list.update(Output)

        print("**************************")

        # Output douga mp4
        #ScoringService.get_model()
        #ScoringService.pw_outdouga(video_path)

    with open('../output/prediction.json', 'w') as f: