윤영빈

mid commit

model_checkpoint_path: "E:/savedModel\\inference_model\\segment_inference_model"
all_model_checkpoint_paths: "E:/savedModel\\inference_model\\segment_inference_model"
{"model": "FrameLevelLogisticModel", "feature_sizes": "1024,128", "feature_names": "rgb,audio", "frame_features": true, "label_loss": "CrossEntropyLoss"}
\ No newline at end of file
model_checkpoint_path: "/root/volume/youtube-8m/saved_model/inference_model/segment_inference_model"
all_model_checkpoint_paths: "/root/volume/youtube-8m/saved_model/inference_model/segment_inference_model"
{"model": "FrameLevelLogisticModel", "feature_sizes": "1024,128", "feature_names": "rgb,audio", "frame_features": true, "label_loss": "CrossEntropyLoss"}
\ No newline at end of file
......@@ -108,10 +108,13 @@ def recommend_videos(tags, segments, tag_model_path, video_model_path, video_id_
error_tags.append(tag)
kernel[k] = segment_vector
for t in tagKernel:
print(t)
#여기에서 유사한 벡터들을 뽑아냄
#현재는 비디오id로 영상을 얻을 수 없으므로 반환값으로 비디오 아이디와 태그들, 확률 사용
video_tags = pd.read_csv('/mnt/e/khuhub/2015104192/web/backend/yt8m/esot3ria/segment_tags.csv', encoding='utf8',error_bad_lines=False)
video_tags_per_id = pd.read_csv('/mnt/e/khuhub/2015104192/web/backend/yt8m/esot3ria/videoIds.csv', encoding='utf8',error_bad_lines=False)
videoId_index = 0
videoVectorList = []
segmentTagList = []
prevVideoId = ""
......@@ -124,7 +127,18 @@ def recommend_videos(tags, segments, tag_model_path, video_model_path, video_id_
if prevVideoId == "":
prevVideoId = video_id
if video_id[0:4] != prevVideoId[0:4]:
if video_id[0:4] != prevVideoId[0:4]:
currentComparingVideoTags = video_tags_per_id.loc[videoId_index]
videoId_index += 1
print(videoTagList)
print(currentComparingVideoTags)
if (currentComparingVideoTags['segment1'].split(':')[0] not in videoTagList and
currentComparingVideoTags['segment2'].split(':')[0] not in videoTagList and
currentComparingVideoTags['segment3'].split(':')[0] not in videoTagList and
currentComparingVideoTags['segment4'].split(':')[0] not in videoTagList and
currentComparingVideoTags['segment5'].split(':')[0] not in videoTagList):
continue
#여기서 모다진걸로 컨볼루션 연산
#convmaxima, convidx = convolution(videoVectorList,kernel,prevVideoId)
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
TEST_TAGS_PATH = "/mnt/e/khuhub/2015104192/web/backend/yt8m/esot3ria/test_segement_tags.csv"
'''
test(TAG_VECTOR_MODEL_PATH,
VIDEO_VECTOR_MODEL_PATH,
VIDEO_ID_MODEL_PATH,
......@@ -373,4 +387,4 @@ test(TAG_VECTOR_MODEL_PATH,
VIDEO_TAGS_PATH,
TEST_TAGS_PATH,
5)
'''
\ No newline at end of file
\ No newline at end of file
......