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

Connetion Error After Uploading Videos on Extract Frames Tab #98

Closed
renaissance12138 opened this issue Jul 16, 2024 · 12 comments
Closed
Assignees

Comments

@renaissance12138
Copy link

We failed to extract frames after uploading our videos on browser lightening app. What should we do next.
WechatIMG1784

@themattinthehatt
Copy link
Collaborator

@renaissance12138 if you navigate back to the command line where you launched the app there should be a bunch of logging outputs. can you copy/paste the end of that output, where the error was raised?

@renaissance12138
Copy link
Author

INFO:APP.EXTRACT_FRAMES:============== extracting frames from data/0716-treeshaw-pose-example/videos/recording_1_jump_4.mp4 ================
INFO:APP.EXTRACT_FRAMES:video file exists? True
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 79/79 [00:00<00:00, 210.11it/s]
Process ForkProcess-8:
Traceback (most recent call last):
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/lightning/app/utilities/proxies.py", line 433, in call
raise ex
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/lightning/app/utilities/proxies.py", line 414, in call
self.run_once()
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/lightning/app/utilities/proxies.py", line 566, in run_once
self.work.on_exception(ex)
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/lightning/app/core/work.py", line 644, in on_exception
raise exception
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/lightning/app/utilities/proxies.py", line 531, in run_once
ret = self.run_executor_cls(self.work, work_run, self.delta_queue)(*args, **kwargs)
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/lightning/app/utilities/proxies.py", line 364, in call
return self.work_run(*args, **kwargs)
File "/teamspace/studios/this_studio/Pose-app/lightning_pose_app/ui/extract_frames.py", line 323, in run
self._extract_frames(method="random", **kwargs)
File "/teamspace/studios/this_studio/Pose-app/lightning_pose_app/ui/extract_frames.py", line 123, in _extract_frames
idxs_selected = select_frame_idxs_kmeans(
File "/teamspace/studios/this_studio/Pose-app/lightning_pose_app/backend/extract_frames.py", line 103, in select_frame_idxs_kmeans
assert (end_frame - beg_frame) >= n_frames_to_select, "valid video segment too short!"
AssertionError: valid video segment too short!
INFO: Your Lightning App is being stopped. This won't take long.
INFO: Received SIGTERM signal. Gracefully terminating fiftyone...
INFO: Received SIGTERM signal. Gracefully terminating tensorboard...
INFO: Received SIGTERM signal. Gracefully terminating label_studio.label_studio...
INFO: Received SIGTERM signal. Gracefully terminating train_ui.work...
INFO: Received SIGTERM signal. Gracefully terminating streamlit_video.work...
INFO: Received SIGTERM signal. Gracefully terminating streamlit_frame.work...
INFO: Your Lightning App has been stopped successfully!

@themattinthehatt
Copy link
Collaborator

@renaissance12138 the error here says that your video segment is too short for the number of frames you'd like to extract - how long is the video that you uploaded?

@renaissance12138
Copy link
Author

renaissance12138 commented Jul 18, 2024 via email

@themattinthehatt
Copy link
Collaborator

what's the framerate of those videos (i.e., how many frames per vid roughly)? and how many frames are you requesting to label per video?

@renaissance12138
Copy link
Author

renaissance12138 commented Jul 18, 2024 via email

@themattinthehatt
Copy link
Collaborator

ok final question - did you change the slider on the right-hand side, where you can crop off the beginning/end of the video? somehow the video looks too short to the frame extraction function

@renaissance12138
Copy link
Author

renaissance12138 commented Jul 19, 2024 via email

@themattinthehatt
Copy link
Collaborator

Can you try extracting 20 instead of 40 frames and see if that works? Also, if you don't have a problem sending me the video I can play around with it on my side; sending through discord is probably easiest.

@renaissance12138
Copy link
Author

renaissance12138 commented Jul 19, 2024 via email

@renaissance12138
Copy link
Author

renaissance12138 commented Jul 19, 2024 via email

@themattinthehatt
Copy link
Collaborator

@renaissance12138 thanks for sending the video - one issue is that the video is 41 frames long, and we don't allow you to label the final two frames so that they can be reserved as context frames - so the max you could possibly label from this video is 39 frames. There was another patch I needed to make as well, so if you run git pull from inside of your Pose-app directory you'll get the new updates.

There's a lot of redundancy in the frames so I'd recommend labeling 20 frames from 2 such videos (either different trials or different animals) rather than labeling 40 frames from a single video.

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

No branches or pull requests

2 participants