Skip to content

'VideoProcessorCV' object has no attribute 'FPS' #3357

Description

@JohnsonZhouXR

Is there an existing issue for this?

  • I have searched the existing issues

Operating System

Windows 11 + miniconda

DeepLabCut version

3.0.0

What engine are you using?

pytorch

DeepLabCut mode

single animal

Device type

NVIDIA GeForce RTX 5070 Ti, Driver Version: 591.86, CUDA Version: 13.1

Bug description 🐛

Can't create videos after training, error showed like this:
AttributeError: 'VideoProcessorCV' object has no attribute 'FPS'.

Steps To Reproduce

Run like this:

  1. Created a new project [Copy videos to project folder]
  2. Extracted frames
  3. Labeled frames
  4. Created training dataset
  5. Trained metwork
  6. Evaluate network
  7. Analyzed videos
  8. Create videos

Relevant log output

(dlc) C:\Windows\System32>python -m deeplabcut
Starting GUI...
INFO:deeplabcut.gui:Use all bodyparts
INFO:deeplabcut.gui:All video files have been cleared.
INFO:deeplabcut.gui:Cleared selected videos
INFO:deeplabcut.gui:All video files have been cleared.
INFO:deeplabcut.gui:Cleared selected videos
INFO:deeplabcut.gui:All video files have been cleared.
INFO:deeplabcut.gui:Cleared selected videos
INFO:deeplabcut.gui:All video files have been cleared.
INFO:deeplabcut.gui:Cleared selected videos
INFO:deeplabcut.gui:All video files have been cleared.
INFO:deeplabcut.gui:Cleared selected videos
INFO:deeplabcut.gui:All video files have been cleared.
INFO:deeplabcut.gui:Cleared selected videos
INFO:deeplabcut.gui:All video files have been cleared.
INFO:deeplabcut.gui:Cleared selected videos
INFO:deeplabcut.gui:All video files have been cleared.
INFO:deeplabcut.gui:Cleared selected videos
INFO:deeplabcut.gui:Video type set to avi
INFO:deeplabcut.gui:Video type set to avi
INFO:deeplabcut.gui:Video type set to avi
INFO:deeplabcut.gui:Video type set to avi
INFO:deeplabcut.gui:Video type set to avi
INFO:deeplabcut.gui:Video type set to avi
INFO:deeplabcut.gui:Video type set to avi
INFO:deeplabcut.gui:Video type set to avi
INFO:deeplabcut.gui:Videos added to analyze:
{'C:\\Users\\JohnsonZHOU\\Desktop\\Johnson-2026-05-31\\videos\\20250603-1.avi'}
Current video files:
{'C:\\Users\\JohnsonZHOU\\Desktop\\Johnson-2026-05-31\\videos\\20250603-1.avi'}
INFO:deeplabcut.gui.console:Starting to process video: C:\Users\JohnsonZHOU\Desktop\Johnson-2026-05-31\videos\20250603-1.avi
INFO:deeplabcut.gui.console:Loading C:\Users\JohnsonZHOU\Desktop\Johnson-2026-05-31\videos\20250603-1.avi and data.
INFO:deeplabcut.gui.console:No unfiltered data file found in C:\Users\JohnsonZHOU\Desktop\Johnson-2026-05-31\videos for video 20250603-1 and scorer DLC_Resnet50_place_cellMay31shuffle1_snapshot_best-170.
INFO:deeplabcut.gui.console:Failed to create videos from C:\Users\JohnsonZHOU\Desktop\Johnson-2026-05-31\videos\20250603-1.avi.
Traceback (most recent call last):
  File "C:\Users\JohnsonZHOU\miniconda3\envs\dlc\lib\site-packages\deeplabcut\gui\tabs\create_videos.py", line 290, in build_skeleton
    SkeletonBuilder(self.root.config)
  File "C:\Users\JohnsonZHOU\miniconda3\envs\dlc\lib\site-packages\deeplabcut\gui\widgets.py", line 527, in __init__
    QtWidgets.QDialog.__init__(self, parent)
TypeError: SkeletonBuilder.__init__() missing 1 required positional argument: 'config_path'
INFO:deeplabcut.gui:Filtering predictions ENABLED
INFO:deeplabcut.gui:Analyzing 1 video(s) with extension .avi
INFO:deeplabcut.gui.console:Analyzing videos with C:\Users\JohnsonZHOU\Desktop\Johnson-2026-05-31\dlc-models-pytorch\iteration-0\place_cellMay31-trainset95shuffle1\train\snapshot-best-170.pt
INFO:deeplabcut.gui.console:Using scorer: DLC_Resnet50_place_cellMay31shuffle1_snapshot_best-170
INFO:deeplabcut.gui.console:Starting to analyze C:\Users\JohnsonZHOU\Desktop\Johnson-2026-05-31\videos\20250603-1.avi
INFO:deeplabcut.gui.console:Video metadata:
  Overall # of frames:    15429
  Duration of video [s]:  252.98
  fps:                    60.99
  resolution:             w=1280, h=1024

INFO:deeplabcut.gui.console:Running pose prediction with batch size 8
100%|████████████████████████████████████████████████████████████████████████████| 15429/15429 [07:57<00:00, 32.29it/s]
INFO:deeplabcut.gui.console:Saving results in C:\Users\JohnsonZHOU\Desktop\Johnson-2026-05-31\videos\20250603-1DLC_Resnet50_place_cellMay31shuffle1_snapshot_best-170.h5 and C:\Users\JohnsonZHOU\Desktop\Johnson-2026-05-31\videos\20250603-1DLC_Resnet50_place_cellMay31shuffle1_snapshot_best-170_full.pickle
INFO:deeplabcut.gui.console:The videos are analyzed. Now your research can truly start!
You can create labeled videos with 'create_labeled_video'.
If the tracking is not satisfactory for some videos, consider expanding the training set. You can use the function 'extract_outlier_frames' to extract a few representative outlier frames.

INFO:deeplabcut.gui.console:Filtering with median model C:\Users\JohnsonZHOU\Desktop\Johnson-2026-05-31\videos\20250603-1.avi
WARNING: QThread::wait: Thread tried to wait on itself
WARNING:vispy:QThread::wait: Thread tried to wait on itself
Traceback (most recent call last):
  File "C:\Users\JohnsonZHOU\miniconda3\envs\dlc\lib\site-packages\deeplabcut\gui\tabs\create_videos.py", line 257, in create_videos
    videos_created = deeplabcut.create_labeled_video(
  File "C:\Users\JohnsonZHOU\miniconda3\envs\dlc\lib\site-packages\deeplabcut\utils\deprecation.py", line 198, in wrapper
    return fn(*args, **kwargs)
  File "C:\Users\JohnsonZHOU\miniconda3\envs\dlc\lib\site-packages\deeplabcut\utils\make_labeled_video.py", line 784, in create_labeled_video
    results.append(func(video))
  File "C:\Users\JohnsonZHOU\miniconda3\envs\dlc\lib\site-packages\deeplabcut\utils\make_labeled_video.py", line 960, in proc_video
    create_video(
  File "C:\Users\JohnsonZHOU\miniconda3\envs\dlc\lib\site-packages\deeplabcut\utils\make_labeled_video.py", line 1048, in create_video
    CreateVideo(
  File "C:\Users\JohnsonZHOU\miniconda3\envs\dlc\lib\site-packages\deeplabcut\utils\make_labeled_video.py", line 111, in CreateVideo
    fps = clip.fps()
  File "C:\Users\JohnsonZHOU\miniconda3\envs\dlc\lib\site-packages\deeplabcut\utils\video_processor.py", line 79, in fps
    return self.FPS
AttributeError: 'VideoProcessorCV' object has no attribute 'FPS'
INFO:deeplabcut.gui.console:Starting to process video: C:\Users\JohnsonZHOU\Desktop\Johnson-2026-05-31\videos\20250603-1.avi
INFO:deeplabcut.gui.console:Loading C:\Users\JohnsonZHOU\Desktop\Johnson-2026-05-31\videos\20250603-1.avi and data.
INFO:deeplabcut.gui.console:Error: %s
INFO:deeplabcut.gui.console:
INFO:deeplabcut.gui.console:OpenCV(4.8.0) :-1: error: (-5:Bad argument) in function 'VideoCapture'
> Overload resolution failed:
>  - Can't convert object to 'str' for 'filename'
>  - VideoCapture() missing required argument 'apiPreference' (pos 2)
>  - Argument 'index' is required to be an integer
>  - VideoCapture() missing required argument 'apiPreference' (pos 2)

Anything else?

opencv version: '4.8.0'

Code of Conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions