Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Minor] Update utils.py #249

Merged
merged 2 commits into from
Sep 14, 2024
Merged

[Minor] Update utils.py #249

merged 2 commits into from
Sep 14, 2024

Conversation

YangYangGirl
Copy link
Contributor

correct video path in videomme_dic_to_text+subtitle

correct video path in videomme_dic_to_text+subtitle
@kcz358
Copy link
Collaborator

kcz358 commented Sep 13, 2024

Hi @YangYangGirl , may I ask why would this additional hardcoded data path need to be added in the doc to visual function? I think current main branch should works well. If that is your default path in your own settings, maybe this change should be add into your own forked repo? If that is the case, I will close the PR.

@YangYangGirl
Copy link
Contributor Author

The original video path in the main repo does not exist, resulting in total_frame = 0 and subtitle loading as none. It will run smoothly but result in inaccurate results.
image

@kcz358
Copy link
Collaborator

kcz358 commented Sep 14, 2024

I think this problem has been fixed in commit Fix videomme evaluation? Current main branch seems already contains the path to data folder

def videomme_doc_to_visual(doc):
cache_dir = os.path.join(base_cache_dir, cache_name)
video_path = doc["videoID"] + ".mp4"
video_path = os.path.join(cache_dir, "data", video_path)
if os.path.exists(video_path):
video_path = video_path
elif os.path.exists(video_path.replace("mp4", "MP4")):
video_path = video_path.replace("mp4", "MP4")
elif os.path.exists(video_path.replace("mp4", "mkv")):
video_path = video_path.replace("mp4", "mkv")
else:
sys.exit(f"video path:{video_path} does not exist, please check")
return [video_path]

Seems like a duplicate fix. If this is the case, I will close this PR.

@YangYangGirl
Copy link
Contributor Author

Thanks for the kind reply. But I checked again, in

"Humanity & History",
, the video path is still wrong.

@kcz358
Copy link
Collaborator

kcz358 commented Sep 14, 2024

Yeah @YangYangGirl , I see your point. You are correct. I think this is some version problem as we change the logic and default folder for unzipping files. I revise a little bit to make it not absolute path. I think current version should be correct?

@kcz358
Copy link
Collaborator

kcz358 commented Sep 14, 2024

Have done a quick check here and subtitles should have loaded correctly.

image

merging this PR now and thank you for spotting the issue.

@kcz358 kcz358 merged commit ee27be7 into EvolvingLMMs-Lab:main Sep 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants