Showing
32 changed files
with
5 additions
and
3 deletions
No preview for this file type
src/featuremaps/animal-1-features.pb
0 → 100644
No preview for this file type
src/featuremaps/animal-2-features.pb
0 → 100644
No preview for this file type
src/featuremaps/animal-3-features.pb
0 → 100644
No preview for this file type
src/featuremaps/car-1-features.pb
0 → 100644
No preview for this file type
src/featuremaps/car-2-features.pb
0 → 100644
No preview for this file type
src/featuremaps/car-3-features.pb
0 → 100644
No preview for this file type
src/featuremaps/cartoon-1-features.pb
0 → 100644
No preview for this file type
src/featuremaps/cartoon-2-features.pb
0 → 100644
No preview for this file type
src/featuremaps/cartoon-3-features.pb
0 → 100644
No preview for this file type
src/featuremaps/concert-1-features.pb
0 → 100644
No preview for this file type
src/featuremaps/concert-2-features.pb
0 → 100644
No preview for this file type
src/featuremaps/concert-3-features.pb
0 → 100644
No preview for this file type
src/featuremaps/food-1-features.pb
0 → 100644
No preview for this file type
src/featuremaps/food-2-features.pb
0 → 100644
No preview for this file type
src/featuremaps/food-3-features.pb
0 → 100644
No preview for this file type
src/featuremaps/football-1-features.pb
0 → 100644
No preview for this file type
src/featuremaps/football-2-features.pb
0 → 100644
No preview for this file type
src/featuremaps/football-3-features.pb
0 → 100644
No preview for this file type
src/featuremaps/guitar-1-features.pb
0 → 100644
No preview for this file type
src/featuremaps/guitar-2-features.pb
0 → 100644
No preview for this file type
src/featuremaps/guitar-3-features.pb
0 → 100644
No preview for this file type
src/featuremaps/mobilephone-1-features.pb
0 → 100644
No preview for this file type
src/featuremaps/mobilephone-2-features.pb
0 → 100644
No preview for this file type
src/featuremaps/mobilephone-3-features.pb
0 → 100644
No preview for this file type
src/featuremaps/toy-1-features.pb
0 → 100644
No preview for this file type
src/featuremaps/toy-2-features.pb
0 → 100644
No preview for this file type
src/featuremaps/toy-3-features.pb
0 → 100644
No preview for this file type
src/featuremaps/videogame-1-features.pb
0 → 100644
No preview for this file type
src/featuremaps/videogame-2-features.pb
0 → 100644
No preview for this file type
src/featuremaps/videogame-3-features.pb
0 → 100644
No preview for this file type
... | @@ -28,6 +28,9 @@ VOCAB_PATH = "./statics/vocabulary.csv" | ... | @@ -28,6 +28,9 @@ VOCAB_PATH = "./statics/vocabulary.csv" |
28 | TAG_TOP_K = 5 | 28 | TAG_TOP_K = 5 |
29 | VIDEO_TOP_K = 10 | 29 | VIDEO_TOP_K = 10 |
30 | 30 | ||
31 | +# Target featuremap. | ||
32 | +FEATUREMAP_PATH = "./featuremaps/toy-3-features.pb" | ||
33 | + | ||
31 | def get_segments(batch_video_mtx, batch_num_frames, segment_size): | 34 | def get_segments(batch_video_mtx, batch_num_frames, segment_size): |
32 | """Get segment-level inputs from frame-level features.""" | 35 | """Get segment-level inputs from frame-level features.""" |
33 | video_batch_size = batch_video_mtx.shape[0] | 36 | video_batch_size = batch_video_mtx.shape[0] |
... | @@ -229,8 +232,7 @@ def inference_pb(file_path, threshold): | ... | @@ -229,8 +232,7 @@ def inference_pb(file_path, threshold): |
229 | 232 | ||
230 | 233 | ||
231 | if __name__ == '__main__': | 234 | if __name__ == '__main__': |
232 | - filepath = "./featuremaps/features.pb" | 235 | + result = inference_pb(FEATUREMAP_PATH, 5) |
233 | - result = inference_pb(filepath, 5) | ||
234 | print("=============== Old Model ===============") | 236 | print("=============== Old Model ===============") |
235 | print(result["tag_result"]) | 237 | print(result["tag_result"]) |
236 | print(json.dumps(result["video_result"], sort_keys=True, indent=2)) | 238 | print(json.dumps(result["video_result"], sort_keys=True, indent=2)) |
... | @@ -240,6 +242,6 @@ if __name__ == '__main__': | ... | @@ -240,6 +242,6 @@ if __name__ == '__main__': |
240 | TAG_VECTOR_MODEL_PATH = "./new_model/tag_vectors.model" | 242 | TAG_VECTOR_MODEL_PATH = "./new_model/tag_vectors.model" |
241 | VIDEO_VECTOR_MODEL_PATH = "./new_model/video_vectors.model" | 243 | VIDEO_VECTOR_MODEL_PATH = "./new_model/video_vectors.model" |
242 | VIDEO_TAGS_PATH = "./statics/new_kaggle_solution_40k.csv" | 244 | VIDEO_TAGS_PATH = "./statics/new_kaggle_solution_40k.csv" |
243 | - result = inference_pb(filepath, 5) | 245 | + result = inference_pb(FEATUREMAP_PATH, 5) |
244 | print("=============== New Model ===============") | 246 | print("=============== New Model ===============") |
245 | print(json.dumps(result, sort_keys=True, indent=2)) | 247 | print(json.dumps(result, sort_keys=True, indent=2)) | ... | ... |
-
Please register or login to post a comment