payload: {"action":"created","issue":{"url":"https://api.github.com/repos/AlexEMG/DeepLabCut/issues/197","repository_url":"https://api.github.com/repos/AlexEMG/DeepLabCut","labels_url":"https://api.github.com/repos/AlexEMG/DeepLabCut/issues/197/labels{/name}","comments_url":"https://api.github.com/repos/AlexEMG/DeepLabCut/issues/197/comments","events_url":"https://api.github.com/repos/AlexEMG/DeepLabCut/issues/197/events","html_url":"https://github.com/AlexEMG/DeepLabCut/issues/197","id":406102258,"node_id":"MDU6SXNzdWU0MDYxMDIyNTg=","number":197,"title":"Issue in analyze_videos","user":{"login":"rnrpereira","id":2293879,"node_id":"MDQ6VXNlcjIyOTM4Nzk=","avatar_url":"https://avatars1.githubusercontent.com/u/2293879?v=4","gravatar_id":"","url":"https://api.github.com/users/rnrpereira","html_url":"https://github.com/rnrpereira","followers_url":"https://api.github.com/users/rnrpereira/followers","following_url":"https://api.github.com/users/rnrpereira/following{/other_user}","gists_url":"https://api.github.com/users/rnrpereira/gists{/gist_id}","starred_url":"https://api.github.com/users/rnrpereira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnrpereira/subscriptions","organizations_url":"https://api.github.com/users/rnrpereira/orgs","repos_url":"https://api.github.com/users/rnrpereira/repos","events_url":"https://api.github.com/users/rnrpereira/events{/privacy}","received_events_url":"https://api.github.com/users/rnrpereira/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-02-03T15:59:23Z","updated_at":"2019-02-03T18:14:36Z","closed_at":null,"author_association":"NONE","body":"USING: Ubuntu 16.04 LTS, with an Anaconda Env, & DeepLabCut2.0\r\nIpython in docker container\r\n\r\n**The issue:**\r\n=> Videos are not being analyzed!\r\nIt seems **./my_video-5DeepCut_resnet50_testeFeb2shuffle1_600000.h5 does not exist !!**\r\n# #########################################################\r\n```\r\n**In [14]:** deeplabcut.analyze_videos(path_config,['/home/rodrigo/teste-rodrigo-2019-02-02/videos/'],videotype='.mkv')\r\n\r\nUsing snapshot-600000 for model /home/rodrigo/teste-rodrigo-2019-02-02/dlc-models/iteration-0/testeFeb2-trainset95shuffle1\r\nINFO:tensorflow:Restoring parameters from /home/rodrigo/teste-rodrigo-2019-02-02/dlc-models/iteration-0/testeFeb2-trainset95shuffle1/train/snapshot-600000\r\nINFO:tensorflow:Restoring parameters from /home/rodrigo/teste-rodrigo-2019-02-02/dlc-models/iteration-0/testeFeb2-trainset95shuffle1/train/snapshot-600000\r\nAnalyzing all the videos in the directory\r\nStarting to analyze %  my_video-5.mkv\r\nLoading  my_video-5.mkv\r\n---------------------------------------------------------------------------\r\nFileNotFoundError                         Traceback (most recent call last)\r\n/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/predict_videos.py in AnalyzeVideo(video, DLCscorer, trainFraction, cfg, dlc_cfg, sess, inputs, outputs, pdindex, save_as_csv, destfolder)\r\n    262         # Attempt to load data...\r\n--> 263         pd.read_hdf(dataname)\r\n    264         print(\"Video already analyzed!\", dataname)\r\n\r\n/usr/local/lib/python3.6/dist-packages/pandas/io/pytables.py in read_hdf(path_or_buf, key, mode, **kwargs)\r\n    346             raise compat.FileNotFoundError(\r\n--> 347                 'File %s does not exist' % path_or_buf)\r\n    348 \r\n\r\n**_FileNotFoundError: File ./my_video-5DeepCut_resnet50_testeFeb2shuffle1_600000.h5 does not exist_**\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nZeroDivisionError                         Traceback (most recent call last)\r\n<ipython-input-14-86c19342e065> in <module>()\r\n----> 1 deeplabcut.analyze_videos(path_config,['/home/rodrigo/teste-rodrigo-2019-02-02/videos/'],videotype='.mkv')\r\n\r\n/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/predict_videos.py in analyze_videos(config, videos, videotype, shuffle, trainingsetindex, gputouse, save_as_csv, destfolder)\r\n    151         #looping over videos\r\n    152         for video in Videos:\r\n--> 153             AnalyzeVideo(video,DLCscorer,trainFraction,cfg,dlc_cfg,sess,inputs, outputs,pdindex,save_as_csv, destfolder)\r\n    154 \r\n    155     os.chdir(str(start_path))\r\n\r\n/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/predict_videos.py in AnalyzeVideo(video, DLCscorer, trainFraction, cfg, dlc_cfg, sess, inputs, outputs, pdindex, save_as_csv, destfolder)\r\n    269         fps = cap.get(5) #https://docs.opencv.org/2.4/modules/highgui/doc/reading_and_writing_images_and_video.html#videocapture-get\r\n    270         nframes = int(cap.get(7))\r\n--> 271         duration=nframes*1./fps\r\n    272         size=(int(cap.get(4)),int(cap.get(3)))\r\n    273 \r\n\r\n**ZeroDivisionError: float division by zero**\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/AlexEMG/DeepLabCut/issues/comments/460074709","html_url":"https://github.com/AlexEMG/DeepLabCut/issues/197#issuecomment-460074709","issue_url":"https://api.github.com/repos/AlexEMG/DeepLabCut/issues/197","id":460074709,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2MDA3NDcwOQ==","user":{"login":"rnrpereira","id":2293879,"node_id":"MDQ6VXNlcjIyOTM4Nzk=","avatar_url":"https://avatars1.githubusercontent.com/u/2293879?v=4","gravatar_id":"","url":"https://api.github.com/users/rnrpereira","html_url":"https://github.com/rnrpereira","followers_url":"https://api.github.com/users/rnrpereira/followers","following_url":"https://api.github.com/users/rnrpereira/following{/other_user}","gists_url":"https://api.github.com/users/rnrpereira/gists{/gist_id}","starred_url":"https://api.github.com/users/rnrpereira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnrpereira/subscriptions","organizations_url":"https://api.github.com/users/rnrpereira/orgs","repos_url":"https://api.github.com/users/rnrpereira/repos","events_url":"https://api.github.com/users/rnrpereira/events{/privacy}","received_events_url":"https://api.github.com/users/rnrpereira/received_events","type":"User","site_admin":false},"created_at":"2019-02-03T18:14:36Z","updated_at":"2019-02-03T18:14:36Z","author_association":"NONE","body":"```\r\nIn [27]: deeplabcut.__version__\r\nOut[27]: '2.0.4.1'\r\n```\r\nIn other python scripts I use, I can read .mkv files with Opencv 3.4.2 \r\nThe _folder (train)_ you mentioned, where is it exactly?\r\n**********************************************************************************************************************\r\nNow, I've changed: \r\n**`deeplabcut.analyze_videos(path_config,['/home/rodrigo/teste-rodrigo-2019-02-02/videos/'],videotype='.mkv')`**\r\nfor: \r\n**`deeplabcut.analyze_videos(path_config,'/home/rodrigo/teste-rodrigo-2019-02-02/videos/my_video-4.mkv',shuffle=1,save_as_csv=True)`**\r\n\r\nResumed from deeplabcut_evaluate_network as follows... Now, I get:\r\n```\r\n**In [24]: deeplabcut.evaluate_network(path_config, plotting=True)**\r\n/home/rodrigo/teste-rodrigo-2019-02-02/evaluation-results/  already exists!\r\nRunning  DeepCut_resnet50_testeFeb2shuffle1_600000  with # of trainingiterations: 600000\r\nINFO:tensorflow:Restoring parameters from /home/rodrigo/teste-rodrigo-2019-02-02/dlc-models/iteration-0/testeFeb2-trainset95shuffle1/train/snapshot-600000\r\nINFO:tensorflow:Restoring parameters from /home/rodrigo/teste-rodrigo-2019-02-02/dlc-models/iteration-0/testeFeb2-trainset95shuffle1/train/snapshot-600000\r\nAnalyzing data...\r\n58it [00:02, 23.33it/s]\r\nDone and results stored for snapshot:  snapshot-600000\r\nResults for 600000  training iterations: 95 1 train error: 1.28 pixels. Test error: 3.91  pixels.\r\nWith pcutoff of 0.1  train error: 1.28 pixels. Test error: 3.91 pixels\r\nThereby, the errors are given by the average distances between the labels by DLC and the scorer.\r\nPlotting...\r\nThe network is evaluated and the results are stored in the subdirectory 'evaluation_results'.\r\nIf it generalizes well, choose the best model for prediction and update the config file with the appropriate index for the 'snapshotindex'.\r\nUse the function 'analyze_video' to make predictions on new videos.\r\nOtherwise consider retraining the network (see DeepLabCut workflow Fig 2)\r\n\r\n**In [25]: deeplabcut.analyze_videos(path_config,'/home/rodrigo/teste-rodrigo-2019-02-02/videos/',shuffle=1,save_as_csv=True)**\r\nUsing snapshot-600000 for model /home/rodrigo/teste-rodrigo-2019-02-02/dlc-models/iteration-0/testeFeb2-trainset95shuffle1\r\nINFO:tensorflow:Restoring parameters from /home/rodrigo/teste-rodrigo-2019-02-02/dlc-models/iteration-0/testeFeb2-trainset95shuffle1/train/snapshot-600000\r\nINFO:tensorflow:Restoring parameters from /home/rodrigo/teste-rodrigo-2019-02-02/dlc-models/iteration-0/testeFeb2-trainset95shuffle1/train/snapshot-600000\r\nThe videos are analyzed. Now your research can truly start! \r\n You can create labeled videos with 'create_labeled_video'.\r\nIf the tracking is not satisfactory for some videos, consider expanding the training set. You can use the function 'extract_outlier_frames' to extract any outlier frames!\r\n\r\n**In [26]: deeplabcut.create_labeled_video(path_config,['/home/rodrigo/teste-rodrigo-2019-02-02/videos/my-video-4.mkv','/home/rodrigo/teste-rodrigo-\r\n    ...: 2019-02-02/videos/my-video-5.mkv','/home/rodrigo/teste-rodrigo-2019-02-02/videos/my-video-6.mkv'])**\r\n```\r\n**=> But no video is created!**\r\n=> In ../evaluation-results/iteration0/ Folder I have: (1) a _Labeled_Images_DeepCut...snapshot_ Folder with .jpg images; (2) 03 files (a .csv, a ...-results.h5 and a ...-snapshot600000.h5). I believe I have only one set of files...\r\n"}}
other: {"actor":{"display_login":"rnrpereira"}}