Showing
14 changed files
with
18 additions
and
10 deletions
web/backend/yt8m/esot3ria/pmodel/eval/events.out.tfevents.1605444942.DESKTOP-GS43KKE
deleted
100644 → 0
No preview for this file type
web/backend/yt8m/esot3ria/pmodel/inference_model/segment_inference_model.data-00000-of-00001
deleted
100644 → 0
This file is too large to display.
No preview for this file type
No preview for this file type
1 | -{"model": "FrameLevelLogisticModel", "feature_sizes": "1024,128", "feature_names": "rgb,audio", "frame_features": true, "label_loss": "CrossEntropyLoss"} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
No preview for this file type
This file is too large to display.
web/backend/yt8m/esot3ria/prevModel/inference_model/segment_inference_model.index
deleted
100644 → 0
No preview for this file type
No preview for this file type
1 | -{"model": "FrameLevelLogisticModel", "feature_sizes": "1024,128", "feature_names": "rgb,audio", "frame_features": true, "label_loss": "CrossEntropyLoss"} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -108,10 +108,13 @@ def recommend_videos(tags, segments, tag_model_path, video_model_path, video_id_ | ... | @@ -108,10 +108,13 @@ def recommend_videos(tags, segments, tag_model_path, video_model_path, video_id_ |
108 | error_tags.append(tag) | 108 | error_tags.append(tag) |
109 | 109 | ||
110 | kernel[k] = segment_vector | 110 | kernel[k] = segment_vector |
111 | - | 111 | + for t in tagKernel: |
112 | + print(t) | ||
112 | #여기에서 유사한 벡터들을 뽑아냄 | 113 | #여기에서 유사한 벡터들을 뽑아냄 |
113 | #현재는 비디오id로 영상을 얻을 수 없으므로 반환값으로 비디오 아이디와 태그들, 확률 사용 | 114 | #현재는 비디오id로 영상을 얻을 수 없으므로 반환값으로 비디오 아이디와 태그들, 확률 사용 |
114 | video_tags = pd.read_csv('/mnt/e/khuhub/2015104192/web/backend/yt8m/esot3ria/segment_tags.csv', encoding='utf8',error_bad_lines=False) | 115 | video_tags = pd.read_csv('/mnt/e/khuhub/2015104192/web/backend/yt8m/esot3ria/segment_tags.csv', encoding='utf8',error_bad_lines=False) |
116 | + video_tags_per_id = pd.read_csv('/mnt/e/khuhub/2015104192/web/backend/yt8m/esot3ria/videoIds.csv', encoding='utf8',error_bad_lines=False) | ||
117 | + videoId_index = 0 | ||
115 | videoVectorList = [] | 118 | videoVectorList = [] |
116 | segmentTagList = [] | 119 | segmentTagList = [] |
117 | prevVideoId = "" | 120 | prevVideoId = "" |
... | @@ -124,7 +127,18 @@ def recommend_videos(tags, segments, tag_model_path, video_model_path, video_id_ | ... | @@ -124,7 +127,18 @@ def recommend_videos(tags, segments, tag_model_path, video_model_path, video_id_ |
124 | if prevVideoId == "": | 127 | if prevVideoId == "": |
125 | prevVideoId = video_id | 128 | prevVideoId = video_id |
126 | 129 | ||
127 | - if video_id[0:4] != prevVideoId[0:4]: | 130 | + if video_id[0:4] != prevVideoId[0:4]: |
131 | + | ||
132 | + currentComparingVideoTags = video_tags_per_id.loc[videoId_index] | ||
133 | + videoId_index += 1 | ||
134 | + print(videoTagList) | ||
135 | + print(currentComparingVideoTags) | ||
136 | + if (currentComparingVideoTags['segment1'].split(':')[0] not in videoTagList and | ||
137 | + currentComparingVideoTags['segment2'].split(':')[0] not in videoTagList and | ||
138 | + currentComparingVideoTags['segment3'].split(':')[0] not in videoTagList and | ||
139 | + currentComparingVideoTags['segment4'].split(':')[0] not in videoTagList and | ||
140 | + currentComparingVideoTags['segment5'].split(':')[0] not in videoTagList): | ||
141 | + continue | ||
128 | #여기서 모다진걸로 컨볼루션 연산 | 142 | #여기서 모다진걸로 컨볼루션 연산 |
129 | #convmaxima, convidx = convolution(videoVectorList,kernel,prevVideoId) | 143 | #convmaxima, convidx = convolution(videoVectorList,kernel,prevVideoId) |
130 | maxima, idx = differenceMax(segmentTagList,tagKernel,tag_vectors,videoTagList) | 144 | maxima, idx = differenceMax(segmentTagList,tagKernel,tag_vectors,videoTagList) |
... | @@ -365,7 +379,7 @@ VIDEO_ID_MODEL_PATH = "/mnt/e/khuhub/2015104192/web/backend/yt8m/esot3ria/videoI | ... | @@ -365,7 +379,7 @@ VIDEO_ID_MODEL_PATH = "/mnt/e/khuhub/2015104192/web/backend/yt8m/esot3ria/videoI |
365 | 379 | ||
366 | TEST_TAGS_PATH = "/mnt/e/khuhub/2015104192/web/backend/yt8m/esot3ria/test_segement_tags.csv" | 380 | TEST_TAGS_PATH = "/mnt/e/khuhub/2015104192/web/backend/yt8m/esot3ria/test_segement_tags.csv" |
367 | 381 | ||
368 | -''' | 382 | + |
369 | test(TAG_VECTOR_MODEL_PATH, | 383 | test(TAG_VECTOR_MODEL_PATH, |
370 | VIDEO_VECTOR_MODEL_PATH, | 384 | VIDEO_VECTOR_MODEL_PATH, |
371 | VIDEO_ID_MODEL_PATH, | 385 | VIDEO_ID_MODEL_PATH, |
... | @@ -373,4 +387,4 @@ test(TAG_VECTOR_MODEL_PATH, | ... | @@ -373,4 +387,4 @@ test(TAG_VECTOR_MODEL_PATH, |
373 | VIDEO_TAGS_PATH, | 387 | VIDEO_TAGS_PATH, |
374 | TEST_TAGS_PATH, | 388 | TEST_TAGS_PATH, |
375 | 5) | 389 | 5) |
376 | - ''' | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
390 | + | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
This file is too large to display.
-
Please register or login to post a comment