Commit d8a24058 authored by 赵威's avatar 赵威

update offset

parent ce2e0dde
......@@ -57,7 +57,7 @@ def save_diary_image_info(save_file, face_to_vec_f):
}
count = 0
with open(save_file, "w") as f:
res_dict = es_query("diary", q, offset=2000000, size=200000)
res_dict = es_query("diary", q, offset=0, size=200000)
for item in res_dict["hits"]["hits"]:
diary_id = item["_source"]["id"]
# before_cover_url = item["_source"]["before_cover_url"] + "-w"
......@@ -171,7 +171,7 @@ def main():
face_to_vec_f = lambda img: face_to_vec(img, face_rec, face_detector, shape_predictor)
save_diary_image_info(diary_after_cover_vec_file, face_to_vec_f)
# save_faiss_index(diary_after_cover_vec_file, faiss_index_path)
save_faiss_index(diary_after_cover_vec_file, faiss_index_path)
# faiss_index = faiss.read_index(faiss_index_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment