Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-2-capstone-design2
/
2015104192
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
윤영빈
2020-12-17 00:42:36 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0ebfd262e686b6b895a3219a93d331e13228b5f4
0ebfd262
1 parent
e1b0aba0
edit ppt
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
14 deletions
web/backend/yt8m/esot3ria/inference_pb.py
web/backend/yt8m/esot3ria/video_recommender.py
발표영상.mp4
보고서/PPT/내용 기반 유튜브 영상 추천 시스템 개선안.pptx
web/backend/yt8m/esot3ria/inference_pb.py
View file @
0ebfd26
...
...
@@ -219,8 +219,6 @@ def inference_pb(file_path, threshold):
#클래스 확률 클래스 확률... 일케 저장되어 있음
inputVideoTagResults
.
append
(
predictForSegment
)
#이 다음문단은 이전거 원래 이게 recomment videos의 첫 파라미터임
tag_result
=
[]
for
itemIndex
in
range
(
TAG_TOP_K
):
segment_tag
=
str
(
voca_dict
[
str
(
combined_scores
[
itemIndex
][
0
])])
...
...
web/backend/yt8m/esot3ria/video_recommender.py
View file @
0ebfd26
...
...
@@ -85,7 +85,6 @@ def recommend_videos(tags, segments, tag_model_path, video_model_path, video_id_
maxSimilarSegment
=
len
(
segments
)
-
int
(
len
(
kernel
)
/
2
)
-
1
#세그먼트 인덱스 증가
currentIndex
=
currentIndex
+
1
#######################################print('maxSimilarSegment',maxSimilarSegment,'len',len(segments))
#커널 생성
for
k
in
range
(
0
,
len
(
kernel
)):
segment
=
segments
[
maxSimilarSegment
-
math
.
floor
(
len
(
kernel
)
/
2
)
+
k
]
...
...
@@ -124,10 +123,8 @@ def recommend_videos(tags, segments, tag_model_path, video_model_path, video_id_
if
video_id
[
0
:
4
]
!=
prevVideoId
[
0
:
4
]:
#여기서 모다진걸로 컨볼루션 연산
#convmaxima, convidx = convolution(videoVectorList,kernel,prevVideoId)
#여기서 모여진 segment로 컨볼루션 연산
maxima
,
idx
=
differenceMax
(
segmentTagList
,
tagKernel
,
tag_vectors
,
videoTagList
)
#maxima = maxima + convmaxima
localMinima
=
100
localMinimaIndex
=
-
1
...
...
@@ -135,9 +132,7 @@ def recommend_videos(tags, segments, tag_model_path, video_model_path, video_id_
if
float
(
minimunVideoIds
[
seg
][
1
])
<
localMinima
:
localMinima
=
float
(
minimunVideoIds
[
seg
][
1
])
localMinimaIndex
=
seg
#print(maxima)
if
localMinima
<
maxima
:
#print(prevVideoId[0:4] + "_" + str(idx),localMinimaIndex,maxima)
minimunVideoIds
[
localMinimaIndex
]
=
[
prevVideoId
[
0
:
4
]
+
"_"
+
str
(
idx
),
maxima
]
...
...
@@ -207,13 +202,13 @@ def differenceMax(arrs, _kernel, w2v, videoTaglist):
arrs
.
insert
(
0
,
arrs
[
0
])
arrs
.
append
(
arrs
[
len
(
arrs
)
-
1
])
prev
Index
=
0
maxima
Index
=
0
prevMax
=
-
100
for
j
in
range
(
midpos
,
len
(
arrs
)
-
midpos
):
convResult
=
0
processed_vocabNum
=
1
for
i
in
range
(
0
,
s
):
if
(
_kernel
[
i
][
0
]
not
in
arrs
[
j
-
midpos
+
i
][
0
]):
# and ((videoTaglist[0] not in arrs[j - midpos + i][0:2])) and ((videoTaglist[1] not in arrs[j - midpos + i][0:5])):
if
(
_kernel
[
i
][
0
]
not
in
arrs
[
j
-
midpos
+
i
][
0
]):
continue
for
ind
in
range
(
0
,
5
):
if
(
arrs
[
j
-
midpos
+
i
][
ind
][
0
]
in
w2v
.
vocab
)
and
(
_kernel
[
i
][
ind
]
in
w2v
.
vocab
):
...
...
@@ -225,11 +220,10 @@ def differenceMax(arrs, _kernel, w2v, videoTaglist):
if
prevMax
<
convResult
:
prevMax
=
convResult
prev
Index
=
j
-
midpos
maxima
Index
=
j
-
midpos
result
.
append
(
convResult
)
#maxVal = max(result)
#index = result.index(maxVal)
return
prevMax
,
prevIndex
return
prevMax
,
maximaIndex
def
normalize
(
arrs
):
maximum
=
max
(
arrs
)
...
...
발표영상.mp4
deleted
100644 → 0
View file @
e1b0aba
This file is too large to display.
보고서/PPT/내용 기반 유튜브 영상 추천 시스템 개선안.pptx
View file @
0ebfd26
No preview for this file type
Please
register
or
login
to post a comment