Free Motion Capture for Everyone πβ¨
TypeScript
Generalizing skeleton animation
jon matthis3bc12b048fce
diff --git a/MANIFEST.in b/MANIFEST.inindex 4e3af56d..fd9ea7df 100644--- a/MANIFEST.in+++ b/MANIFEST.in@@ -12,5 +12,7 @@ recursive-include docs *.rst conf.py Makefile make.batinclude versioneer.pyinclude freemocap/_version.py+include freemocap/logo/*# If including data files in the package, add them like:# include path/to/data_file+diff --git a/freemocap/__init__.py b/freemocap/__init__.pyindex c8b040e8..2764cdd1 100644--- a/freemocap/__init__.py+++ b/freemocap/__init__.py@@ -3,13 +3,38 @@ from ._version import get_versions__version__ = get_versions()["version"]del get_versions-from freemocap import fmc_runme, fmc_demo+from freemocap.fmc_runme import RunMe-def RunMe(sessionID=None,stage=1,useOpenPose=True, openPoseDummyRun = False, useMediaPipe=False,useDLC=False,dlcConfigPath=None,debug=False,setDataPath=False,userDataPath = None, recordVid=False):- """- Passes user-set values from the freemocap_runme_script to the fmc_runme.Run function (and allows the user to run the pipeline with just an fmc.RunMe command)- """- fmc_runme.Run(sessionID,stage,useOpenPose,openPoseDummyRun, useMediaPipe,useDLC,dlcConfigPath,debug,setDataPath,userDataPath,recordVid)+# from freemocap import fmc_runme, fmc_demo #JSM NOTE - there's gotta be a better way to do this lol++# def RunMe(sessionID=None,+# stage=1,+# useOpenPose=True,+# openPoseDummyRun=False,+# useMediaPipe=False,+# useDLC=False,+# dlcConfigPath=None,+# debug=False,+# setDataPath=False,+# userDataPath = None,+# recordVid=False,+# reconstructionConfidenceThreshold = .8,+# charucoSquareSize = 36,+# ):+# """+# Passes user-set values from the freemocap_runme_script to the fmc_runme.Run function (and allows the user to run the pipeline with just an fmc.RunMe command)+# """+# fmc_runme.Run(sessionID,+# stage,+# useOpenPose,+# openPoseDummyRun,+# useMediaPipe,+# useDLC,+# dlcConfigPath,+# debug,+# setDataPath,+# userDataPath,+# recordVid)def RunDemo():"""diff --git a/freemocap/calibrate.py b/freemocap/calibrate.pyindex 599a6ccf..2782f0c3 100644--- a/freemocap/calibrate.py+++ b/freemocap/calibrate.py@@ -11,7 +11,7 @@ from rich.progress import track-def CalibrateCaptureVolume(session,board):+def CalibrateCaptureVolume(session,board, calVideoFrameLength = 120):"""Check if a previous calibration yaml exists, and if not, create a set of shortened calibration videos and run Anipose functionsto create a calibration yaml. Takes the 2D charuco board points and reconstructs them into 3D points that are saved out@@ -20,12 +20,16 @@ def CalibrateCaptureVolume(session,board):session.calVidPath.mkdir(exist_ok = True)session.dataArrayPath.mkdir(exist_ok = True)- calVideoFrameLength = 60- createCalibrationVideos(session, calVideoFrameLength)+ if calVideoFrameLength < 0:+ calVideoFrameLength = session.numFrames+ calibrationVideoPath = session.syncedVidPath+ else:+ createCalibrationVideos(session, calVideoFrameLength)+ calibrationVideoPath = session.calVidPathvidnames = []cam_names = []- for count, thisVidPath in enumerate(session.calVidPath.glob("*.mp4"), start=1):+ for count, thisVidPath in enumerate(calibrationVideoPath.glob("*.mp4"), start=1):vidnames.append([str(thisVidPath)])cam_names.append(str(count))session.numCams = count@@ -50,9 +54,9 @@ def CalibrateCaptureVolume(session,board):"""Takes as input a list of list of video filenames, one list of each camera.Also takes a board which specifies what should be detected in the videos"""- all_rows = cgroup.get_rows_videos(vidnames, board, verbose=True)+ # all_rows = cgroup.get_rows_videos(vidnames, board, verbose=True)- cgroup.set_camera_sizes_videos(vidnames)+ # cgroup.set_camera_sizes_videos(vidnames)if session.debug:fig = plt.figure(47290)@@ -94,7 +98,7 @@ def CalibrateCaptureVolume(session,board):session.cgroup = cgroup- n_frames = 40+ n_frames = calVideoFrameLengthstartframe = 0n_trackedPoints = 24framelist = range(startframe, startframe + n_frames)@@ -109,7 +113,7 @@ def CalibrateCaptureVolume(session,board):try:charucoarray[cam][count] = data[frame][cam]["filled"]except:- print("failed frame:", frame)+ # print("failed frame:", frame)continuecharuco_nCams_nFrames_nImgPts_XY = np.squeeze(np.array(charucoarray))@@ -176,7 +180,7 @@ def CalibrateCaptureVolume(session,board):plt.show()path_to_charuco_array = session.dataArrayPath/'charuco_3d_points.npy'- np.save(path_to_charuco_array, mean_charuco_fr_mar_dim)+ np.save(path_to_charuco_array, charuco_fr_mar_dim)return cgroup, mean_charuco_fr_mar_dimdiff --git a/freemocap/fmc_pyqtgraph.py b/freemocap/fmc_pyqtgraph.pyindex 32cadfa0..c18fefee 100644--- a/freemocap/fmc_pyqtgraph.py+++ b/freemocap/fmc_pyqtgraph.py@@ -220,6 +220,7 @@ class PlaySkeletonWidget:# Plot Mr. Skreleton :D# Plots the dots+self.skelScatterItem.setData(pos=self.skel_fr_mar_dim[self.currentFrameNumber, :, :])diff --git a/freemocap/fmc_runme.py b/freemocap/fmc_runme.pyindex 4e3513b0..a5aebd9b 100644--- a/freemocap/fmc_runme.py+++ b/freemocap/fmc_runme.py@@ -25,7 +25,7 @@ import numpy as npfrom ruamel.yaml import YAML-def Run(sessionID=None,+def RunMe(sessionID=None,stage=1,useOpenPose=True,openPoseDummyRun = False,@@ -35,7 +35,11 @@ def Run(sessionID=None,debug=False,setDataPath = False,userDataPath = None,- recordVid = True,):+ recordVid = True,+ reconstructionConfidenceThreshold = .8,+ charucoSquareSize = 36,#mm - ~the size of the squares when printed on 8.5x11" paper based on parameters in ReadMe.md+ calVideoFrameLength = 120,+ ):"""Starts the freemocap pipeline based on either user-input values, or default values. Creates a new session class instance (called sesh)based on the specified inputs. Checks for previous user preferences and choices if they exist, or will prompt the user for new choices@@ -157,8 +161,8 @@ def Run(sessionID=None,#marker_length=.8,# square_length = 121, #big boi charuco# marker_length = 98,- square_length = 82,#regular boi charuco- marker_length = 65,+ square_length = charucoSquareSize,#mm+ marker_length = charucoSquareSize*.8,#mmmarker_bits=4, dict_size=250)@@ -197,23 +201,25 @@ def Run(sessionID=None,if stage <= 3:print()print('Starting Calibration')- sesh.cgroup, sesh.mean_charuco_fr_mar_dim = calibrate.CalibrateCaptureVolume(sesh,board)+ sesh.cgroup, sesh.mean_charuco_fr_mar_dim = calibrate.CalibrateCaptureVolume(sesh,board, calVideoFrameLength)else:print('Skipping Calibration')# %% Stage Fourif stage <= 4:+print('Starting Track Image Points')if sesh.useMediaPipe:fmc_mediapipe.runMediaPipe(sesh)sesh.mediaPipeData_nCams_nFrames_nImgPts_XYC = fmc_mediapipe.parseMediaPipe(sesh)- sesh.mediaPipeSkel_fr_mar_dim = reconstruct3D.reconstruct3D(sesh,sesh.mediaPipeData_nCams_nFrames_nImgPts_XYC, confidenceThreshold=.5)+ sesh.mediaPipeSkel_fr_mar_dim = reconstruct3D.reconstruct3D(sesh,sesh.mediaPipeData_nCams_nFrames_nImgPts_XYC, confidenceThreshold=reconstructionConfidenceThreshold)np.save(sesh.dataArrayPath/'mediaPipeSkel_3d.npy', sesh.mediaPipeSkel_fr_mar_dim) #save data to npysesh.save_session()+if sesh.useOpenPose:fmc_openpose.runOpenPose(sesh, dummyRun=openPoseDummyRun)sesh.openPoseData_nCams_nFrames_nImgPts_XYC = fmc_openpose.parseOpenPose(sesh)- sesh.openPoseSkel_fr_mar_dim = reconstruct3D.reconstruct3D(sesh,sesh.openPoseData_nCams_nFrames_nImgPts_XYC, confidenceThreshold=.5)+ sesh.openPoseSkel_fr_mar_dim = reconstruct3D.reconstruct3D(sesh,sesh.openPoseData_nCams_nFrames_nImgPts_XYC, confidenceThreshold=reconstructionConfidenceThreshold)np.save(sesh.dataArrayPath/'openPoseSkel_3d.npy', sesh.openPoseSkel_fr_mar_dim) #save data to npysesh.save_session()sesh.syncedVidList = []@@ -224,87 +230,38 @@ def Run(sessionID=None,for config_path in dlc_config_paths:dlc.analyze_videos(config_path,sesh.syncedVidList, destfolder= sesh.dlcDataPath, save_as_csv=True)sesh.dlcData_nCams_nFrames_nImgPts_XYC = fmc_deeplabcut.parseDeepLabCut(sesh, config_path)- sesh.dlc_fr_mar_dim = reconstruct3D.reconstruct3D(sesh,sesh.dlcData_nCams_nFrames_nImgPts_XYC, confidenceThreshold=.95)+ sesh.dlc_fr_mar_dim = reconstruct3D.reconstruct3D(sesh,sesh.dlcData_nCams_nFrames_nImgPts_XYC, confidenceThreshold=reconstructionConfidenceThreshold)np.save(sesh.dataArrayPath/'deepLabCut_3d.npy', sesh.dlc_fr_mar_dim) #save data to npysesh.save_session()else:print('Skipping Run MediaPipe')- # # %% Stage Five- # if not stage > 5:- # print('Starting Parse MediaPipe')- # sesh.mediaPipeData_nCams_nFrames_nImgPts_XYC = fmc_mediapipe.parseMediaPipe(sesh)- # else:- # print('Skipping Parse MediaPipe')---- # # %% Stage Six- # if not stage > 6:- # print()- # print('Starting Skeleton Reconstruction')- # sesh.skel_fr_mar_dim = reconstruct3D.reconstruct3D(sesh,sesh.mediaPipeData_nCams_nFrames_nImgPts_XYC, confidenceThreshold=.1)-- # path_to_skel_points = sesh.dataArrayPath/'skeleton_points.npy'- # np.save(path_to_skel_points, sesh.skel_fr_mar_dim)- # else:- # print('Skipping Skeleton Reconstruction')---- #reupdate the config_settings with mediapipe and openpose image paths- #sesh.config_settings = recordingconfig.load_config_yaml(sesh.yamlPath)--- # %% Stage Six- if stage <= 6:- print ('Starting PyQT Animation')- createvideo.createBodyTrackingVideos(sesh)- displayVid = 1- #if displayVid = 0, will show the synced videos- #if displayVid = 1, will show the openPosed videos- playWin = PlayerDockedWindow(sesh,displayVid)- playWin.animate()-- # %% Stage Seven- if stage <= 7:+ # %% Stage Five - Make Skreleton Animation+ if stage <= 5:print('Starting Skeleton Plotting')- playskeleton.ReplaySkeleton_matplotlib(- sesh,- vidType=1,- startFrame=40,- azimuth=-90,- elevation=-80,- useOpenPose=sesh.useOpenPose,- useMediaPipe=sesh.useMediaPipe,- useDLC=sesh.useDLC)- # fmc_pyqtgraph.PlaySkeleton(- # sesh,- # vidType=1,- # startFrame=40,- # azimuth=-90,- # elevation=-80,- # useOpenPose=useOpenPose,- # useMediaPipe=useMediaPipe,- # useDLC=useDLC)-- # playSkel = PlaySkeleton(sesh)- # playSkel.animate()- #playWin =PlayerDockedWindow(sesh)- #playWin.animate()++ play_skeleton_animation.PlaySkeletonAnimation(+ sesh,+ startFrame=0,+ azimuth=-90,+ elevation=-81,+ useOpenPose=True,+ useMediaPipe=False,+ useDLC=False,+ recordVid = recordVid+ )+ # print ('Starting PyQT Animation')+ # createvideo.createBodyTrackingVideos(sesh)+ # displayVid = 1+ # #if displayVid = 0, will show the synced videos+ # #if displayVid = 1, will show the openPosed videos+ # playWin = PlayerDockedWindow(sesh,displayVid)+ # playWin.animate()else:print('Skipping Skeleton Plotting')- ## JSM NOTE: Deprecated by 'play_skeleton_animation.py' (also, we don't need the 'imOut' folder anymore)- # %% Stage Eight- if stage <= 8:- print()- print('Starting Video Creation')- createvideo.createVideo(sesh)- else:- print('Skipping Video Creation')diff --git a/freemocap/logo/fmc-logo-black-border-white-bkgd.png b/freemocap/logo/fmc-logo-black-border-white-bkgd.pngnew file mode 100644index 00000000..cb33a712Binary files /dev/null and b/freemocap/logo/fmc-logo-black-border-white-bkgd.png differdiff --git a/freemocap/logo/freemocap-logo-black-border.svg b/freemocap/logo/freemocap-logo-black-border.svgnew file mode 100644index 00000000..86d72f70--- /dev/null+++ b/freemocap/logo/freemocap-logo-black-border.svg@@ -0,0 +1,237 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->+<svg version="1.1"+ id="svg8" inkscape:version="1.0.2 (e86c8708, 2021-01-15)" sodipodi:docname="fmc-logo-border-2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 461.4 584.5"+ style="enable-background:new 0 0 461.4 584.5;" xml:space="preserve">+<style type="text/css">+ .st0{display:none;}+ .st1{display:none;fill:#A4D6D9;}+ .st2{fill:#A4D6D9;}+ .st3{opacity:0.15;fill:#365D5F;enable-background:new ;}+ .st4{fill:#D95157;}+</style>+<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="layer1" inkscape:cx="372.3481" inkscape:cy="440.11451" inkscape:document-rotation="0" inkscape:document-units="mm" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="921" inkscape:window-maximized="0" inkscape:window-width="1348" inkscape:window-x="144" inkscape:window-y="25" inkscape:zoom="0.65138101" pagecolor="#ffffff" showgrid="false">+ </sodipodi:namedview>+<g id="layer2" transform="translate(6.5984788,6.6389071)" inkscape:groupmode="layer" inkscape:label="Layer 2" class="st0">+ <ellipse id="path962" cx="171.3" cy="282.5" rx="146.1" ry="160.4"/>+</g>+<g id="layer1" transform="translate(-32.625961,-40.2606)" inkscape:groupmode="layer" inkscape:label="Layer 1">++ <image style="display:none;overflow:visible;enable-background:new ;" width="1668" height="2224" id="image843" xlink:href="16530232.png" transform="matrix(0.3849 0 0 0.3691 -49.7662 -67.5522)">+ </image>++ <image style="display:none;overflow:visible;enable-background:new ;" width="1668" height="2224" id="image865" xlink:href="16530236.png" transform="matrix(0.4143 0 0 0.3995 -66.2662 -100.5522)">+ </image>+ <path id="path853" class="st1" d="M167.8,601.5c-3.5-0.8-5.5-1.7-9.6-4.6c-4.1-2.8-6.6-5.5-9.4-10.2c-5-8.3-7.4-17.6-7.9-30.1+ l-0.3-6.8l-1.6-3.7c-0.9-2-2.9-6.6-4.4-10.2c-1.6-3.6-3.4-8-4.1-9.8c-2-5.7-4.7-14.2-4.7-14.9c0-1.9,5.3-4.6,7.4-3.7+ c1.4,0.6,1.9,1.6,1.5,3c-0.7,2.3-0.2,8.4,0.9,11.2c0.6,1.5,2.6,4.6,3.1,4.6c0.5,0,0.4-2.7-0.1-4.8c-0.8-3.5-1.4-9.2-1.1-10.4+ c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9+ c-4.6-1.3-13-2.8-17.2-3c-9.5-0.6-19.6,2.3-26.1,7.5c-3.3,2.6-7.3,8.9-9.3,14.7c-1.3,3.7-1.5,4.5-1.6,8.7c-0.2,7.6,0.6,20,1.9,28.4+ c0.6,4.2,1.4,9.6,1.8,12c0.7,5.4,1.3,7.8,3.1,13.2c1.7,5.2,3,7.5,5.8,11c4.6,5.7,10.4,9.4,19.9,12.6c8,2.7,11.6,3.3,19.1,3.1+ C238.2,348.9,242.2,348.6,244,348.4L244,348.4z M103.6,335.9c9.2-3.4,14.1-7.6,18.2-15.3c4.9-9.4,7.9-31,6.1-43.5+ c-1.5-10.3-5.3-19.9-10.5-26.5c-2.4-3-9.3-9-12-10.3c-2.4-1.2-7.1-2.4-10.5-2.7c-2.5-0.3-8,0.7-11.6,2c-1.2,0.4-3.3,1.6-4.6,2.5+ c-3.5,2.6-5.7,5.4-7.7,9.9l-1.7,3.9l0.1,29.9c0.1,21.8,0.2,30.4,0.6,31.9c0.7,3,4.9,10.9,7,13.1c1.2,1.2,3,2.5,5.6,3.9+ c4.3,2.3,7.1,2.9,12.7,3C98.6,337.8,99,337.7,103.6,335.9L103.6,335.9z M64.4,320.2c-0.1-0.1-0.3,0-0.3,0.2c0,0.3,0.1,0.4,0.3,0.2+ C64.6,320.5,64.6,320.3,64.4,320.2L64.4,320.2z M63.8,305.8c0-0.1-0.1-0.2-0.2-0.2c-0.1,0-0.2,0.1-0.2,0.2s0.1,0.2,0.2,0.2+ C63.7,306,63.8,305.9,63.8,305.8z"/>+ <g id="path959">+ <path id="path966" sodipodi:nodetypes="csssssscssssssssscscccccsssssssscccssccccsscssssssssccssccscssscccsssscc" d="+ M241.9,40.7c-21.9,1.4-41.7,4.7-60.9,10.1c-7.6,2.2-22.2,7.2-29.9,10.2c-7.7,3-17.8,8.2-25.2,12.7c-26.1,15.7-48.9,38.5-64.3,64.5+ c-11.8,19.8-20.8,44.8-25,68.5c-2.4,13.7-3.3,22.4-3.4,36.3c-0.1,6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 l-2-0.5l-0.2-2.9c-0.5-5.7-3.5-16-4.7-16c-1,0-1,4.4-0.1,10.2c0.5,3,0.9,6.2,0.9,7c0,1.4-0.1,1.5-1.9,2.4+ C169.5,478.1,163.5,478.3,159.3,477.3L159.3,477.3z M162.4,392.7c0.5-0.5,1.5-1.9,2.2-3.2c1.2-2.4,1.3-2.5,1.3-7.6+ c0-4.7-0.1-5.6-1.2-9.6c-2.7-9.9-10.3-23.8-17.7-32.3c-2.9-3.3-4-4.2-6.5-5.5c-2.2-1.1-3.4-1-5.1,0.3c-1.7,1.3-1.7,1.4-2.3,6.6+ c-0.5,4.9-1.2,8.6-2.9,16.1c-2.1,9.6-3.4,19.4-3.1,24.6c0.3,4.7,0.7,6.3,1.9,7.6c1.5,1.6,4.2,0.6,5.6-2.1c2-3.8,2.6-9.2,3-25.3+ c0.2-10.6,0.3-12,0.8-11.6c0.9,0.7,5.7,10.3,6.6,13.3c2.4,7.5,6.4,18.6,7.8,21.4c1.2,2.4,2.2,3.7,4.2,5.6+ C159.8,393.8,160.8,394.1,162.4,392.7L162.4,392.7z M244,348.4c6.5-0.8,13.2-2.6,18.1-5c2.5-1.2,9.7-7,12.1-9.6+ c4.5-5,6.4-8.4,9-16.2c2.3-6.9,2.9-10.6,2.9-18.6c0-10.1-1.3-16-5.5-24c-5.6-10.7-12.6-18.8-21.1-24.3c-5.8-3.8-15.2-8.1-21.6-9.9+ c-4.6-1.3-13-2.8-17.2-3c-9.5-0.6-19.6,2.3-26.1,7.5c-3.3,2.6-7.3,8.9-9.3,14.7c-1.3,3.7-1.5,4.5-1.6,8.7+ c-0.2,7.6,0.6,20,1.9,28.4c0.6,4.2,1.4,9.6,1.8,12c0.7,5.4,1.3,7.8,3.1,13.2c1.7,5.2,3,7.5,5.8,11c4.6,5.7,10.4,9.4,19.9,12.6+ c8,2.7,11.6,3.3,19.1,3.1C238.2,348.9,242.2,348.6,244,348.4L244,348.4z M103.6,335.9c9.2-3.4,14.1-7.6,18.2-15.3+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4,19.9,12.6+ c8,2.7,11.6,3.3,19.1,3.1C238.2,348.9,242.2,348.6,244,348.4L244,348.4z M103.6,335.9c9.2-3.4,14.1-7.6,18.2-15.3+ c4.9-9.4,7.9-31,6.1-43.5c-1.5-10.3-5.3-19.9-10.5-26.5c-2.4-3-9.3-9-12-10.3c-2.4-1.2-7.1-2.4-10.5-2.7c-2.5-0.3-8,0.7-11.6,2+ c-1.2,0.4-3.3,1.6-4.6,2.5c-3.5,2.6-5.7,5.4-7.7,9.9l-1.7,3.9l0.1,29.9c0.1,21.8,0.2,30.4,0.6,31.9c0.7,3,4.9,10.9,7,13.1+ c1.2,1.2,3,2.5,5.6,3.9c4.3,2.3,7.1,2.9,12.7,3C98.6,337.8,99,337.7,103.6,335.9L103.6,335.9z M64.4,320.2c-0.1-0.1-0.3,0-0.3,0.2+ c0,0.3,0.1,0.4,0.3,0.2C64.6,320.5,64.6,320.3,64.4,320.2L64.4,320.2z M63.8,305.8c0-0.1-0.1-0.2-0.2-0.2c-0.1,0-0.2,0.1-0.2,0.2+ s0.1,0.2,0.2,0.2C63.7,306,63.8,305.9,63.8,305.8z"/>+ </g>+ <path id="path869" class="st4" d="M237,432.3c-0.2-0.5-1.3-6.3-2.5-12.9c-1.2-6.6-3-17-4.2-23.2c-2.5-13.7-12.2-67.3-15-82.9+ c-0.7-3.8-1.4-7.1-1.6-7.3c-0.2-0.2-2.4-0.8-4.8-1.5c-15.3-3.9-40.4-10.8-42.2-11.6c-0.9-0.4-1.2-0.9-1.2-1.6+ c0-0.5-0.1-1.2-0.3-1.4c-0.5-0.7,0.2-1.3,3.2-2.6c3.8-1.7,22.1-8.7,33.5-13c5-1.8,9.3-3.5,9.6-3.8c0.3-0.3,0.7-3.6,1-9.7+ c0.3-5.1,0.9-15.4,1.3-22.9c0.4-7.5,1.3-21.9,1.9-32c0.6-10.1,1.5-25.7,2.1-34.8s1.1-19.1,1.3-22.4c0.2-3.3,0.4-6.3,0.7-6.7+ c0.4-0.8,2.1-0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2,19.1c-1,8.1-1.5,13.7-1.9,19.3c-0.2,3.3-0.4,4.3-0.8,4.3+ C291.5,422.3,291.3,422.2,291.3,422.1L291.3,422.1z M291.9,257.8c-0.1-0.2-0.7-2.1-1.2-4.3c-0.6-2.2-2.3-8.9-3.9-14.9+ c-1.6-6-3.2-12.4-3.6-14.2l-0.7-3.2l-7.5-1.7c-9.7-2.2-10.5-2.4-10.8-3.1c-0.2-0.6,0.1-0.7,8.4-2.8c2.4-0.6,5.5-1.4,6.8-1.8+ l2.5-0.7l0.7-7.1c0.4-3.9,1-9.7,1.4-12.7c0.4-3.1,0.9-7.8,1.2-10.5c0.5-4.6,1-6.3,1.7-5.3c0.1,0.2,0.6,2.5,1.1,5+ c0.4,2.5,1,5.3,1.2,6.1c0.2,0.9,0.7,3.3,1.1,5.3c0.9,5,4.9,18,5.7,18.4c0.7,0.4,10.4,1.5,16.3,1.8c6.8,0.4,8,0.8,6,1.8+ c-1.1,0.6-14.9,4.9-18.4,5.8c-1.6,0.4-3,0.8-3.2,1c-0.2,0.1-1,6.2-1.8,13.4c-1.4,11.7-1.7,16.5-1.8,22.5+ C292.9,258,292.5,258.6,291.9,257.8L291.9,257.8z"/>+</g>+</svg>diff --git a/freemocap/logo/freemocap-logo-white-border.png b/freemocap/logo/freemocap-logo-white-border.pngnew file mode 100644index 00000000..5a7b06a7Binary files /dev/null and b/freemocap/logo/freemocap-logo-white-border.png differdiff --git a/freemocap/play_skeleton_animation.py b/freemocap/play_skeleton_animation.pyindex 6a6f7be2..6c3713f5 100644--- a/freemocap/play_skeleton_animation.py+++ b/freemocap/play_skeleton_animation.py@@ -1,4 +1,3 @@-"""============ββββββ ββ βββββ ββ ββ βββββββ ββ ββ βββββββ ββ βββββββ ββββββββ ββββββ βββ ββ βββββ βββ ββ ββ βββ βββ βββββ ββββββββ ββ ββββββ βββ ββ@@ -38,6 +37,7 @@ from matplotlib.widgets import Sliderimport cv2from scipy.signal import savgol_filter+import copyfrom pathlib import Path@@ -63,21 +63,19 @@ def PlaySkeletonAnimation(startFrame=0,azimuth=-90,elevation=-61,- numCams=4,- useCams = None,useOpenPose=True,useMediaPipe=False,useDLC=False,recordVid = True):-###-###-### ββ ββ ββββββ ββββββ βββββ ββββββββ βββββββ βββββββ ββ ββββββ ββ ββ ββββββ βββββββ-### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ-### ββ ββ ββββββ ββ ββ βββββββ ββ βββββ βββββ ββ ββ βββ ββ ββ ββββββ βββββ-### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ-### ββββββ ββ ββββββ ββ ββ ββ βββββββ ββ ββ ββββββ ββββββ ββ ββ βββββββ-###+ ###+ ###+ ### ββ ββ ββββββ ββββββ βββββ ββββββββ βββββββ βββββββ ββ ββββββ ββ ββ ββββββ βββββββ+ ### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ+ ### ββ ββ ββββββ ββ ββ βββββββ ββ βββββ βββββ ββ ββ βββ ββ ββ ββββββ βββββ+ ### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ+ ### ββββββ ββ ββββββ ββ ββ ββ βββββββ ββ ββ ββββββ ββββββ ββ ββ βββββββ+ ###def update_figure(frameNum):"""Called by matplotlib animator for each frame.@@ -86,6 +84,9 @@ def PlaySkeletonAnimation(skel_dottos = matplotlib_artist_objs['skel_dottos']skel_trajectories = figure_data['skel_trajectories|mar|fr_dim']+ charuco_dottos = matplotlib_artist_objs['charuco_dottos']+ charuco_trajectories = figure_data['charuco_trajectories|mar|fr_dim']+if useDLC:dlc_dottos = matplotlib_artist_objs['dlc_dottos']dlc_trajectories = figure_data['dlc_trajectories|mar|fr_dim']@@ -113,20 +114,27 @@ def PlaySkeletonAnimation(update_3d_skel_segments('lHand', skel_fr_mar_dim)update_3d_skel_segments('face', skel_fr_mar_dim)- update_3d_skel_segments('pinkBall', dlc_fr_mar_dim)- update_3d_skel_segments('redBall', dlc_fr_mar_dim)- update_3d_skel_segments('greenBall', dlc_fr_mar_dim)- update_3d_skel_segments('wobbleBoard', dlc_fr_mar_dim)- update_3d_skel_segments('wobbleWheel', dlc_fr_mar_dim)-- for bb in range(3):- thisTailArtist = matplotlib_artist_objs['ball_tails'][bb]-- thisTailArtist.set_data((dlc_trajectories[bb][frameNum-ballTailLen:frameNum+1, 0],- dlc_trajectories[bb][frameNum-ballTailLen:frameNum+1, 1]))-- thisTailArtist.set_3d_properties(dlc_trajectories[bb][frameNum-ballTailLen:frameNum+1, 2])-+ if useDLC:+ update_3d_skel_segments('pinkBall', dlc_fr_mar_dim)+ update_3d_skel_segments('redBall', dlc_fr_mar_dim)+ update_3d_skel_segments('greenBall', dlc_fr_mar_dim)+ update_3d_skel_segments('wobbleBoard', dlc_fr_mar_dim)+ update_3d_skel_segments('wobbleWheel', dlc_fr_mar_dim)++ for bb in range(3):+ thisTailArtist = matplotlib_artist_objs['ball_tails'][bb]++ thisTailArtist.set_data((dlc_trajectories[bb][frameNum-ballTailLen:frameNum+1, 0],+ dlc_trajectories[bb][frameNum-ballTailLen:frameNum+1, 1]))++ thisTailArtist.set_3d_properties(dlc_trajectories[bb][frameNum-ballTailLen:frameNum+1, 2])+ #dlc data+ marNum = -1+ for thisDotto, thisTraj in zip(dlc_dottos,dlc_trajectories):+ marNum+=1+ # NOTE: there is no .set_data() for 3 dim data...+ thisDotto.set_data(thisTraj[ frameNum, 0:2])+ thisDotto.set_3d_properties(thisTraj[ frameNum, 2])#Plots the dots!#openpose data@@ -137,13 +145,18 @@ def PlaySkeletonAnimation(thisSkelDotto.set_data(thisTraj[ frameNum, 0:2])thisSkelDotto.set_3d_properties(thisTraj[ frameNum, 2])- #dlc data- marNum = -1- for thisDotto, thisTraj in zip(dlc_dottos,dlc_trajectories):- marNum+=1- # NOTE: there is no .set_data() for 3 dim data...- thisDotto.set_data(thisTraj[ frameNum, 0:2])- thisDotto.set_3d_properties(thisTraj[ frameNum, 2])+ #charuco data++ for thisDotto, thisTraj in zip(charuco_dottos,charuco_trajectories):++ if frameNum<charuco_trajectories[0].shape[0]:+ thisDotto.set_data(thisTraj[ frameNum, 0:2])+ thisDotto.set_3d_properties(thisTraj[ frameNum, 2])+ else:+ thisDotto.set_color('none')+++# function to update the lines for each body segmentdef update_2d_skel_segments(vidNum,key):@@ -168,7 +181,8 @@ def PlaySkeletonAnimation(vidNum = -1- for thisVidArtist, thisVidDLCArtist, thisVidOpenPoseArtist_dict in zip(vidAristList, vidDLCArtistList, list_of_vidOpenPoseArtistdicts):+ # for thisVidArtist, thisVidDLCArtist, thisVidOpenPoseArtist_dict in zip(vidAristList, vidDLCArtistList, list_of_vidOpenPoseArtistdicts): #JSM NOTE - This for loop needs to be fixed to work when DLC is true+ for thisVidArtist, thisVidOpenPoseArtist_dict in zip(vidAristList, list_of_vidOpenPoseArtistdicts):vidNum +=1vidCapObjList[vidNum].set(cv2.CAP_PROP_POS_FRAMES, frameNum)success, image = vidCapObjList[vidNum].read()@@ -178,8 +192,9 @@ def PlaySkeletonAnimation(vidCapObjList[vidNum].set(cv2.CAP_PROP_POS_FRAMES, 0)success, image = vidCapObjList[vidNum].read()- thisVidDLCArtist[0].set_data( dlcData_nCams_nFrames_nImgPts_XYC[vidNum,frameNum,:,0],- dlcData_nCams_nFrames_nImgPts_XYC[vidNum,frameNum,:,1],)+ if useDLC:+ thisVidDLCArtist[0].set_data( dlcData_nCams_nFrames_nImgPts_XYC[vidNum,frameNum,:,0],+ dlcData_nCams_nFrames_nImgPts_XYC[vidNum,frameNum,:,1],)update_2d_skel_segments(vidNum,'body')update_2d_skel_segments(vidNum,'rHand')@@ -203,31 +218,31 @@ def PlaySkeletonAnimation(# fig.suptitle("nSessionID: {}, Frame: {} of {}".format(session.sessionID, frameNum, numFrames), fontsize=10)# animSlider.set_val(val=frameNum)-####-#### ββββββ ββββββ βββββββ βββββ ββββββββ βββββββ βββββββ ββ ββββββ ββ ββ ββββββ βββββββ-#### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ-#### ββ ββββββ βββββ βββββββ ββ βββββ βββββ ββ ββ βββ ββ ββ ββββββ βββββ-#### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ-#### ββββββ ββ ββ βββββββ ββ ββ ββ βββββββ ββ ββ ββββββ ββββββ ββ ββ βββββββ-####+ ####+ #### ββββββ ββββββ βββββββ βββββ ββββββββ βββββββ βββββββ ββ ββββββ ββ ββ ββββββ βββββββ+ #### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ+ #### ββ ββββββ βββββ βββββββ ββ βββββ βββββ ββ ββ βββ ββ ββ ββββββ βββββ+ #### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ+ #### ββββββ ββ ββ βββββββ ββ ββ ββ βββββββ ββ ββ ββββββ ββββββ ββ ββ βββββββ+ ####fig = plt.figure(dpi=200)plt.ion()-###-### ββββββ ββββββ βββββββ βββββ ββββββββ βββββββ ββββββ ββββββ βββββ ββ ββ ββ βββββββ-### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ-### ββ ββββββ βββββ βββββββ ββ βββββ βββββ βββββ ββ ββ βββββββ βββ ββ βββββββ-### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ-### ββββββ ββ ββ βββββββ ββ ββ ββ βββββββ ββββββ ββββββ ββ ββ ββ ββ ββ βββββββ-###-###+ ###+ ### ββββββ ββββββ βββββββ βββββ ββββββββ βββββββ ββββββ ββββββ βββββ ββ ββ ββ βββββββ+ ### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ+ ### ββ ββββββ βββββ βββββββ ββ βββββ βββββ βββββ ββ ββ βββββββ βββ ββ βββββββ+ ### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ+ ### ββββββ ββ ββ βββββββ ββ ββ ββ βββββββ ββββββ ββββββ ββ ββ ββ ββ ββ βββββββ+ ###+ #### ax3d = p3.Axes3D(fig)ax3d = fig.add_subplot(projection='3d')- ax3d.set_position([-.065, .35, .7, .7]) # [left, bottom, width, height])+ ax3d.set_position([-.065, .28, .7, .7]) # [left, bottom, width, height])ax3d.set_xticklabels([])ax3d.set_yticklabels([])ax3d.set_zticklabels([])@@ -246,21 +261,32 @@ def PlaySkeletonAnimation(except:console.warning('No openPose data found. This iteration requires OpenPose data')- # smoothThese = np.arange(67, skel_fr_mar_dim.shape[1])- smoothThese = np.arange(0, skel_fr_mar_dim.shape[1])-- for mm in smoothThese:- if mm > 24 and mm < 67: #don't smooth the hands, or they disappear! :O- pass- else:- for dim in range(skel_fr_mar_dim.shape[2]):- skel_fr_mar_dim[:,mm,dim] = savgol_filter(skel_fr_mar_dim[:,mm,dim], 5, 3)+ try:+ charuco_fr_mar_dim = np.load(session.dataArrayPath / 'charuco_3d_points.npy')+ except:+ console.warning('No charuco data found')++ smoothData=True+ if smoothData:+ # smoothThese = np.arange(67, skel_fr_mar_dim.shape[1])+ smoothThese = np.arange(0, skel_fr_mar_dim.shape[1])+ for mm in smoothThese:+ if mm > 24 and mm < 67: #don't smooth the hands, or they disappear! :O+ pass+ else:+ for dim in range(skel_fr_mar_dim.shape[2]):+ skel_fr_mar_dim[:,mm,dim] = savgol_filter(skel_fr_mar_dim[:,mm,dim], 5, 3)figure_data = dict()skel_trajectories = [skel_fr_mar_dim[:,markerNum,:] for markerNum in range(skel_fr_mar_dim.shape[1])]figure_data['skel_trajectories|mar|fr_dim'] = skel_trajectoriesfigure_data['skel_fr_mar_dim'] = skel_fr_mar_dim++ charuco_trajectories = [charuco_fr_mar_dim[:,markerNum,:] for markerNum in range(charuco_fr_mar_dim.shape[1])]+ figure_data['charuco_trajectories|mar|fr_dim'] = charuco_trajectories+ figure_data['charuco_fr_mar_dim'] = charuco_fr_mar_dim+dict_of_openPoseSegmentIdx_dicts, dict_of_skel_lineColor = formatOpenPoseStickIndices() #these will help us draw body and hands stick figuresif useDLC:@@ -275,9 +301,9 @@ def PlaySkeletonAnimation(if ballTailLen > startFrame:startFrame = ballTailLen+1 #gotta do this, or the tail will index negative frames (without requiring annoying checks later)- dlc_trajectories = [dlc_fr_mar_dim[:,markerNum,:] for markerNum in range(dlc_fr_mar_dim.shape[1])]- figure_data['dlc_trajectories|mar|fr_dim'] = dlc_trajectories- figure_data['dlc_fr_mar_dim'] = dlc_fr_mar_dim+ dlc_trajectories = [dlc_fr_mar_dim[:,markerNum,:] for markerNum in range(dlc_fr_mar_dim.shape[1])]+ figure_data['dlc_trajectories|mar|fr_dim'] = dlc_trajectories+ figure_data['dlc_fr_mar_dim'] = dlc_fr_mar_dim@@ -350,20 +376,22 @@ def PlaySkeletonAnimation(matplotlib_artist_objs['lHand'] = build_3d_segment_artist_dict(skel_fr_mar_dim, dict_of_openPoseSegmentIdx_dicts['lHand'], segColor=np.append(humon_blue, 1), markerType='.', markerEdgeColor = humon_blue, lineWidth=1, marSize = 2)matplotlib_artist_objs['face'] = build_3d_segment_artist_dict(skel_fr_mar_dim, dict_of_openPoseSegmentIdx_dicts['face'], segColor='k', lineWidth=.5)- dict_of_dlcSegmentIdx_dicts = dict()- dict_of_dlcSegmentIdx_dicts['pinkBall'] = {'pinkBall': [0]}- dict_of_dlcSegmentIdx_dicts['greenBall'] = {'greenBall': [1]}- dict_of_dlcSegmentIdx_dicts['redBall'] = {'redBall': [2]}- dict_of_dlcSegmentIdx_dicts['wobbleBoard'] = {'wobbleboard':[3,4,5,6,3,7,5,4,7,6]}- dict_of_dlcSegmentIdx_dicts['wobbleWheel'] = {'wobbleWheel':[8,9]}+ if useDLC:+ dict_of_dlcSegmentIdx_dicts = dict()+ dict_of_dlcSegmentIdx_dicts['pinkBall'] = {'pinkBall': [0]}+ dict_of_dlcSegmentIdx_dicts['greenBall'] = {'greenBall': [1]}+ dict_of_dlcSegmentIdx_dicts['redBall'] = {'redBall': [2]}+ dict_of_dlcSegmentIdx_dicts['wobbleBoard'] = {'wobbleboard':[3,4,5,6,3,7,5,4,7,6]}+ dict_of_dlcSegmentIdx_dicts['wobbleWheel'] = {'wobbleWheel':[8,9]}- ballColor = ['darkviolet', 'forestgreen', 'xkcd:goldenrod']- matplotlib_artist_objs['pinkBall'] = build_3d_segment_artist_dict(dlc_fr_mar_dim, dict_of_dlcSegmentIdx_dicts['pinkBall'], segColor=ballColor[0], markerType = 'o', marSize = 6, markerEdgeColor = 'indigo')- matplotlib_artist_objs['redBall'] = build_3d_segment_artist_dict(dlc_fr_mar_dim, dict_of_dlcSegmentIdx_dicts['redBall'], segColor=ballColor[2], markerType = 'o', marSize = 6, markerEdgeColor ='orangered')- matplotlib_artist_objs['greenBall'] = build_3d_segment_artist_dict(dlc_fr_mar_dim, dict_of_dlcSegmentIdx_dicts['greenBall'], segColor=ballColor[1], markerType = 'o', marSize = 6, markerEdgeColor ='darkgreen')++ ballColor = ['darkviolet', 'forestgreen', 'xkcd:goldenrod']+ matplotlib_artist_objs['pinkBall'] = build_3d_segment_artist_dict(dlc_fr_mar_dim, dict_of_dlcSegmentIdx_dicts['pinkBall'], segColor=ballColor[0], markerType = 'o', marSize = 6, markerEdgeColor = 'indigo')+ matplotlib_artist_objs['redBall'] = build_3d_segment_artist_dict(dlc_fr_mar_dim, dict_of_dlcSegmentIdx_dicts['redBall'], segColor=ballColor[2], markerType = 'o', marSize = 6, markerEdgeColor ='orangered')+ matplotlib_artist_objs['greenBall'] = build_3d_segment_artist_dict(dlc_fr_mar_dim, dict_of_dlcSegmentIdx_dicts['greenBall'], segColor=ballColor[1], markerType = 'o', marSize = 6, markerEdgeColor ='darkgreen')- matplotlib_artist_objs['wobbleBoard'] = build_3d_segment_artist_dict(dlc_fr_mar_dim, dict_of_dlcSegmentIdx_dicts['wobbleBoard'], segColor='k', lineWidth=1)- matplotlib_artist_objs['wobbleWheel'] = build_3d_segment_artist_dict(dlc_fr_mar_dim, dict_of_dlcSegmentIdx_dicts['wobbleWheel'], segColor='k', lineWidth=1)+ matplotlib_artist_objs['wobbleBoard'] = build_3d_segment_artist_dict(dlc_fr_mar_dim, dict_of_dlcSegmentIdx_dicts['wobbleBoard'], segColor='k', lineWidth=1)+ matplotlib_artist_objs['wobbleWheel'] = build_3d_segment_artist_dict(dlc_fr_mar_dim, dict_of_dlcSegmentIdx_dicts['wobbleWheel'], segColor='k', lineWidth=1)skel_dottos = []for mm in range(67): #getcher dottos off my face!@@ -383,13 +411,17 @@ def PlaySkeletonAnimation(matplotlib_artist_objs['skel_dottos'] = skel_dottos- matplotlib_artist_objs['dlc_dottos'] = [ax3d.plot(thisTraj[0, 0:1], thisTraj[1, 0:1], thisTraj[2, 0:1],'b.', markersize=1)[0] for thisTraj in dlc_trajectories]+ matplotlib_artist_objs['charuco_dottos'] = [ax3d.plot(thisTraj[0, 0:1], thisTraj[1, 0:1], thisTraj[2, 0:1],'m.', markersize=1)[0] for thisTraj in charuco_trajectories]+++ if useDLC:+ matplotlib_artist_objs['dlc_dottos'] = [ax3d.plot(thisTraj[0, 0:1], thisTraj[1, 0:1], thisTraj[2, 0:1],'b.', markersize=1)[0] for thisTraj in dlc_trajectories]- matplotlib_artist_objs['ball_tails'] = [ax3d.plot(- dlc_trajectories[bb][startFrame-ballTailLen:startFrame, 0],- dlc_trajectories[bb][startFrame-ballTailLen:startFrame, 1],- dlc_trajectories[bb][startFrame-ballTailLen:startFrame, 2],- '-', color=ballColor[bb])[0] for bb in range(3)]+ matplotlib_artist_objs['ball_tails'] = [ax3d.plot(+ dlc_trajectories[bb][startFrame-ballTailLen:startFrame, 0],+ dlc_trajectories[bb][startFrame-ballTailLen:startFrame, 1],+ dlc_trajectories[bb][startFrame-ballTailLen:startFrame, 2],+ '-', color=ballColor[bb])[0] for bb in range(3)]numFrames = skel_fr_mar_dim.shape[0]@@ -407,83 +439,45 @@ def PlaySkeletonAnimation(# groundYY = np.zeros_like(groundXX)# groundMesh = ax3d.plot_surface(groundXX, groundZZ, groundYY, color='k', alpha=.5)- axRange = 500#session.board.square_length * 10+ axRange = 300#session.board.square_length * 10# Setting the axes propertiesax3d.set_xlim3d([mx-axRange, mx+axRange])ax3d.set_ylim3d([my-axRange, my+axRange])- ax3d.set_zlim3d([mz-axRange-1600, mz+axRange-1600])+ ax3d.set_zlim3d([mz-axRange, mz+axRange])- fig.suptitle("-The FreeMoCap Project-", fontsize=14)+ tit1 = fig.text(.5, .96, "The FreeMoCap Project", fontsize=15, horizontalalignment='center')+ tit2 = fig.text(.5, .92, "Session: {}".format(session.sessionID), fontsize=8, horizontalalignment='center')++ax3d.view_init(azim=azimuth, elev=elevation)-###-###-### βββ βββ βββββ ββ ββ βββββββ ββ ββ ββ ββββββ βββββββ ββββββ βββββ ββ ββ βββββββ βββββββ-### ββββ ββββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ-### ββ ββββ ββ βββββββ βββββ βββββ ββ ββ ββ ββ ββ βββββ ββ ββ βββββββ βββ βββββ βββββββ-### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ-### ββ ββ ββ ββ ββ ββ βββββββ ββββ ββ ββββββ βββββββ ββββββ ββ ββ ββ ββ βββββββ βββββββ-###-###+ ###+ ###+ ### βββ βββ βββββ ββ ββ βββββββ ββ ββ ββ ββββββ βββββββ ββββββ βββββ ββ ββ βββββββ βββββββ+ ### ββββ ββββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ+ ### ββ ββββ ββ βββββββ βββββ βββββ ββ ββ ββ ββ ββ βββββ ββ ββ βββββββ βββ βββββ βββββββ+ ### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ+ ### ββ ββ ββ ββ ββ ββ βββββββ ββββ ββ ββββββ βββββββ ββββββ ββ ββ ββ ββ βββββββ βββββββ+ ###+ ###syncedVidPathListAll = list(sorted(session.syncedVidPath.glob('*.mp4')))-- #remove a few vids, 6 is too many! NOTE - this is kinda hardcoded for the 20-07-2021 release video- if session.sessionID == 'sesh_21-07-08_131030':- useCams = [0,1,2,3]- # delTheseVids = [4,1]-- if useCams: #JSM NOTE _ This might not work at all lol- syncedVidPathList = [syncedVidPathListAll[camNum] for camNum in useCams]- dlcData_nCams_nFrames_nImgPts_XYC = dlcData_nCams_nFrames_nImgPts_XYC[useCams, :, :, :]- openPoseData_nCams_nFrames_nImgPts_XYC = openPoseData_nCams_nFrames_nImgPts_XYC[useCams, :, :, :]- else:- syncedVidPathList = syncedVidPathListAll.copy()+ numVids = len(syncedVidPathListAll)++ syncedVidPathList = syncedVidPathListAll.copy()vidAxesList = []vidAristList = []vidCapObjList = []list_of_vidOpenPoseArtistdicts = []- vidDLCArtistList = []- vidAx_positions = []-- left = .45- bottom = 0.05- vidWidth = .38- vidHeight = vidWidth- widthScale = .6- heightScale = 1.2-- vidAx_positions.append([- left,- bottom,- vidWidth,- vidHeight])-- vidAx_positions.append([- left+vidWidth*widthScale,- bottom,- vidWidth,- vidHeight])-- vidAx_positions.append([- left,- bottom+vidHeight*heightScale,- vidWidth,- vidHeight])-- vidAx_positions.append([- left+vidWidth*widthScale,- bottom+vidHeight*heightScale,- vidWidth,- vidHeight])+ if useDLC: vidDLCArtistList = []def build_2d_segment_artist_dict(vidNum, data_nCams_nFrames_nImgPts_XYC, dict_of_list_of_segment_idxs, segColor = 'k', lineWidth = 1, lineStyle = '-'):"""@@ -530,13 +524,31 @@ def PlaySkeletonAnimation()[0]return dict_of_artist_objects+ # vidImageGrid = ImageGrid(fig, [.45, 0.05, .54, .9], nrows_ncols = (2,2), axes_pad = 0.1) # https://matplotlib.org/stable/gallery/axes_grid1/simple_axesgrid.html+ if numVids < 4:+ numRows = numVids+ numCols = 1+ else:+ numRows = int(np.ceil(numVids/2))+ numCols = 2+++ vidAxGridSpec = fig.add_gridspec(numRows, numCols, left=.55, bottom=.025, right=.9, top=.9, wspace=.1, hspace=.1)+- for vidSubplotNum, thisVidPath in enumerate(syncedVidPathList):+ for thisVidNum, thisVidPath in enumerate(syncedVidPathList):#make subplot for figure (and set position)- thisVidAxis = fig.add_subplot(- position=vidAx_positions[vidSubplotNum],- label="Vid_{}".format(str(vidSubplotNum)),- )++ if numVids < 4:+ thisVidAxis = fig.add_subplot(vidAxGridSpec[thisVidNum])+ elif numVids %2 > 0: #if odd number videos plot the first vid across 2 spots+ if thisVidNum==0:+ thisVidAxis = fig.add_subplot(vidAxGridSpec[0,:])+ else:+ thisVidAxis = fig.add_subplot(vidAxGridSpec[thisVidNum+1])+ else:+ thisVidAxis = fig.add_subplot(vidAxGridSpec[thisVidNum])+thisVidAxis.set_axis_off()@@ -558,17 +570,17 @@ def PlaySkeletonAnimation(if useOpenPose:vidOpenPoseArtist_dict = dict()- vidOpenPoseArtist_dict['body'] = build_2d_segment_artist_dict(vidSubplotNum, openPoseData_nCams_nFrames_nImgPts_XYC, dict_of_openPoseSegmentIdx_dicts['body'], segColor = dict_of_skel_lineColor)- vidOpenPoseArtist_dict['rHand'] = build_2d_segment_artist_dict(vidSubplotNum, openPoseData_nCams_nFrames_nImgPts_XYC, dict_of_openPoseSegmentIdx_dicts['rHand'], segColor=np.append(humon_red, .75), lineWidth=.5)- vidOpenPoseArtist_dict['lHand'] = build_2d_segment_artist_dict(vidSubplotNum, openPoseData_nCams_nFrames_nImgPts_XYC, dict_of_openPoseSegmentIdx_dicts['lHand'], segColor=np.append(humon_blue, .75), lineWidth=.5)- vidOpenPoseArtist_dict['face'] = build_2d_segment_artist_dict(vidSubplotNum, openPoseData_nCams_nFrames_nImgPts_XYC, dict_of_openPoseSegmentIdx_dicts['face'], segColor = np.array([1.,1.,1.,1]), lineWidth=.25)+ vidOpenPoseArtist_dict['body'] = build_2d_segment_artist_dict(thisVidNum, openPoseData_nCams_nFrames_nImgPts_XYC, dict_of_openPoseSegmentIdx_dicts['body'], segColor = dict_of_skel_lineColor)+ vidOpenPoseArtist_dict['rHand'] = build_2d_segment_artist_dict(thisVidNum, openPoseData_nCams_nFrames_nImgPts_XYC, dict_of_openPoseSegmentIdx_dicts['rHand'], segColor=np.append(humon_red, .75), lineWidth=.5)+ vidOpenPoseArtist_dict['lHand'] = build_2d_segment_artist_dict(thisVidNum, openPoseData_nCams_nFrames_nImgPts_XYC, dict_of_openPoseSegmentIdx_dicts['lHand'], segColor=np.append(humon_blue, .75), lineWidth=.5)+ vidOpenPoseArtist_dict['face'] = build_2d_segment_artist_dict(thisVidNum, openPoseData_nCams_nFrames_nImgPts_XYC, dict_of_openPoseSegmentIdx_dicts['face'], segColor = np.array([1.,1.,1.,1]), lineWidth=.25)list_of_vidOpenPoseArtistdicts.append(vidOpenPoseArtist_dict)if useDLC:vidDLCArtistList.append(thisVidAxis.plot(- dlcData_nCams_nFrames_nImgPts_XYC[vidSubplotNum,startFrame,:,0],- dlcData_nCams_nFrames_nImgPts_XYC[vidSubplotNum,startFrame,:,1],+ dlcData_nCams_nFrames_nImgPts_XYC[thisVidNum,startFrame,:,0],+ dlcData_nCams_nFrames_nImgPts_XYC[thisVidNum,startFrame,:,1],linestyle='none',marker = '.',markersize = 1,@@ -588,45 +600,27 @@ def PlaySkeletonAnimation(fps=30 #NOTE - This should be saved in the session Class some howtime = np.arange(0, numFrames)/fps- rHandX = skel_trajectories[4][:,0]- rHandY = -skel_trajectories[4][:,1]- lHandX = skel_trajectories[7][:,0]- lHandY = -skel_trajectories[7][:,1]-- ballX_1 = dlc_trajectories[2][:lHandX.shape[0],0] #NOTE - Why tf aren't these the same length already?!?- ballY_1 = -dlc_trajectories[2][:lHandX.shape[0],1]- ballLineColor_1 = ballColor[2]-- # ballX_2 = dlc_trajectories[1][:lHandX.shape[0],0] #NOTE - Why tf aren't these the same length already?!?- # ballY_2 = -dlc_trajectories[1][:lHandX.shape[0],1]- # ballLineColor_2 = ballColor[1]-- # ballX_3 = dlc_trajectories[0][:lHandX.shape[0],0] #NOTE - Why tf aren't these the same length already?!?- # ballY_3 = -dlc_trajectories[0][:lHandX.shape[0],1]- # ballLineColor_3 = ballColor[0]+ rHandX = skel_trajectories[4][:,0]/1000 #convert mm to meters+ rHandY = -skel_trajectories[4][:,1]/1000+ lHandX = skel_trajectories[7][:,0]/1000+ lHandY = -skel_trajectories[7][:,1]/1000++ linePlotWidth = .45+ linePlotHeight = .14- yTimeSeriesAx = fig.add_subplot(position=[.07, .25, .45, .18])- yTimeSeriesAx.set_title('Hand and Juggling Ball Position vs Time', fontsize = 7, pad=2)+ yTimeSeriesAx = fig.add_subplot(position=[.07, .225, linePlotWidth, linePlotHeight])+ yTimeSeriesAx.set_title('Hand Position vs Time', fontsize = 7, pad=2)- yTimeSeriesAx.plot(time, ballY_1, color=ballLineColor_1, alpha=.99, linewidth=1.5, label='Juggling Ball')- # yTimeSeriesAx.plot(time, ballY_2, color=ballLineColor_2, alpha=.99, linewidth=1.5, label='Juggling Ball')- # yTimeSeriesAx.plot(time, ballY_3, color=ballLineColor_3, alpha=.99, linewidth=1.5, label='Juggling Ball')yTimeSeriesAx.plot(time, rHandY, color=humon_red, linewidth=.75, label='Right Hand')yTimeSeriesAx.plot(time, lHandY, color=humon_blue, linewidth=.75, label='Left Hand')-+ timeRange = 3+ ylimRange = .6- ylimRange = 300yCurrTimeArtists = dict()yCurrTimeYdata = dict()yCurrTimeArtists['blackLine'] = yTimeSeriesAx.plot([startFrame/fps, startFrame/fps], [-ylimRange, ylimRange*2], color='k', linewidth=1)- yCurrTimeArtists['JugglingBall_1'] = yTimeSeriesAx.plot([startFrame/fps], [ballY_1[startFrame]], color=ballLineColor_1, markeredgecolor = 'orangered',marker='o', markersize=5)- yCurrTimeYdata['JugglingBall_1'] = ballY_1- # yCurrTimeArtists['JugglingBall_2'] = yTimeSeriesAx.plot([startFrame/fps], [ballY_2[startFrame]], color=ballLineColor_2, markeredgecolor = 'darkgreen',marker='o', markersize=5)- # yCurrTimeYdata['JugglingBall_2'] = ballY_2- # yCurrTimeArtists['JugglingBall_3'] = yTimeSeriesAx.plot([startFrame/fps], [ballY_3[startFrame]], color=ballLineColor_3, markeredgecolor = 'violet',marker='o', markersize=5)- # yCurrTimeYdata['JugglingBall_3'] = ballY_3yCurrTimeArtists['rHandDot'] = yTimeSeriesAx.plot([startFrame/fps], [rHandY[startFrame]], markeredgecolor=humon_red, markerfacecolor = 'k',marker='o', markersize=3)yCurrTimeYdata['rHandDot'] = rHandY@@ -638,9 +632,9 @@ def PlaySkeletonAnimation(yTimeSeriesAx.tick_params(labelsize=6, direction='in', width=.5)yTimeSeriesAx.tick_params( pad=2)- timeRange = 3- yTimeSeriesAx.set_ylabel('Vertical (mm)', fontsize=7, labelpad=4)- yTimeSeriesAx.set_ylim([-150, 600])++ yTimeSeriesAx.set_ylabel('Vertical (m)', fontsize=7, labelpad=3)+ yTimeSeriesAx.set_ylim([-ylimRange, ylimRange])yTimeSeriesAx.set_xlim([(startFrame/fps)-timeRange, (startFrame/fps)+timeRange])@@ -654,25 +648,16 @@ def PlaySkeletonAnimation(- xTimeSeriesAx = fig.add_subplot(position=[.07, 0.065, .45, .18])+ xTimeSeriesAx = fig.add_subplot(position=[.07, 0.05, linePlotWidth, linePlotHeight])- xTimeSeriesAx.plot(time, ballX_1, color=ballLineColor_1, alpha=.99, linewidth=1.25, label='Juggling Ball')- # xTimeSeriesAx.plot(time, ballX_2, color=ballLineColor_2, alpha=.99, linewidth=1.25, label='Juggling Ball')- # xTimeSeriesAx.plot(time, ballX_3, color=ballLineColor_3, alpha=.99, linewidth=1.25, label='Juggling Ball')xTimeSeriesAx.plot(time, rHandX, color=humon_red, linewidth=.75, label='Right Hand')xTimeSeriesAx.plot(time, lHandX, color=humon_blue, linewidth=.75, label='Left Hand')- ylimRange = 300+xCurrTimeArtists = dict()xCurrTimeYdata = dict()xCurrTimeArtists['blackLine'] = xTimeSeriesAx.plot([startFrame/fps, startFrame/fps], [-ylimRange, ylimRange], color='k', linewidth=1)- xCurrTimeArtists['JugglingBall_1'] = xTimeSeriesAx.plot([startFrame/fps], [ballX_1[startFrame]], color=ballLineColor_1, markeredgecolor = 'orangered',marker='o', markersize=5)- xCurrTimeYdata['JugglingBall_1'] = ballX_1- # xCurrTimeArtists['JugglingBall_2'] = xTimeSeriesAx.plot([startFrame/fps], [ballX_1[startFrame]], color=ballLineColor_2, markeredgecolor = 'darkgreen',marker='o', markersize=5)- # xCurrTimeYdata['JugglingBall_2'] = ballX_2- # xCurrTimeArtists['JugglingBall_3'] = xTimeSeriesAx.plot([startFrame/fps], [ballX_1[startFrame]], color=ballLineColor_3, markeredgecolor = 'indigo',marker='o', markersize=5)- # xCurrTimeYdata['JugglingBall_3'] = ballX_3xCurrTimeArtists['rHandDot'] = xTimeSeriesAx.plot([startFrame/fps], [rHandX[startFrame]], markeredgecolor=humon_red, markerfacecolor = 'k',marker='o', markersize=3)xCurrTimeYdata['rHandDot'] = rHandXxCurrTimeArtists['lHandDot'] = xTimeSeriesAx.plot([startFrame/fps], [lHandX[startFrame]], markeredgecolor=humon_blue, markerfacecolor = 'k', marker='o', markersize=3)@@ -683,7 +668,7 @@ def PlaySkeletonAnimation(xTimeSeriesAx.tick_params(labelsize=6, direction='in', width=.5)xTimeSeriesAx.tick_params( pad=2)- xTimeSeriesAx.set_ylabel('Left/Right (mm)', fontsize=7, labelpad=1)+ xTimeSeriesAx.set_ylabel('Left/Right (m)', fontsize=7, labelpad=0)xTimeSeriesAx.set_xlabel('Time(sec)', fontsize=8, labelpad=0)xTimeSeriesAx.set_ylim([-ylimRange, ylimRange])@@ -708,12 +693,12 @@ def PlaySkeletonAnimation(# orientation="horizontal"# )- thisVidAxis.text(-565,1440, 'Music - artist: Neon Exdeath, song: Meowmaline, album: Jewel Tones',color=humon_green, fontsize=6)- thisVidAxis.text(-565,1480, 'Code - github.com/jonmatthis/freemocap || jonmatthis.com/freemocap',color=humon_green, fontsize=6)+ # thisVidAxis.text(-565,1440, 'Music - artist: Neon Exdeath, song: Meowmaline, album: Jewel Tones',color=humon_green, fontsize=6)+ thisVidAxis.text(-150,510, 'github.com/jonmatthis/freemocap || jonmatthis.com/freemocap',color=humon_green, fontsize=6)- logoAx = fig.add_subplot(position=[.9, .9, .1, .1])- logoIm = cv2.imread(r"C:\Users\jonma\Downloads\freemocap-logo-border-2.png")- logoAx.imshow(cv2.cvtColor(logoIm, cv2.COLOR_BGR2RGB))+ logoAx = fig.add_subplot(position=[.85, .85, .15, .15])+ logoIm = cv2.imread(r'freemocap\logo\fmc-logo-black-border-white-bkgd.png') #JSM NOTE - THis doesn't work, but SOMETIMES IT DOES?!+ if logoIm is not None: logoAx.imshow(cv2.cvtColor(logoIm, cv2.COLOR_BGR2RGB))logoAx.axis('off')@@ -724,7 +709,7 @@ def PlaySkeletonAnimation(if recordVid:- vidSavePath = '{}_outVid.mp4'.format(str(session.sessionPath / session.sessionID))+ vidSavePath = '{}_animVid.mp4'.format(str(session.sessionPath / session.sessionID))with console.status('Saving video - {}'.format(vidSavePath)):Writer = animation.writers['ffmpeg']writer = Writer(fps=30, metadata=dict(artist='FreeMoCap'))#, bitrate=1800)@@ -733,23 +718,23 @@ def PlaySkeletonAnimation(# vidSavePath = '{}_outVid.mp4'.format(str(session.sessionPath / session.sessionID))# Writer.saving(fig = fig, outfile=vidSavePath, dpi=150)-plt.pause(0.1)plt.draw()+console.print(":sparkle: :skull: :sparkle:")-###-###-### βββββββ ββββββ ββββββ βββ βββ βββββ ββββββββ ββββββ ββββββ βββββββ βββ ββ ββββββ ββββββ βββββββ βββββββ βββββββ ββ ββ βββββββ ββ-### ββ ββ ββ ββ ββ ββββ ββββ ββ ββ ββ ββ ββ ββ ββ ββ ββββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ-### βββββ ββ ββ ββββββ ββ ββββ ββ βββββββ ββ ββ ββ ββββββ βββββ ββ ββ ββ ββββββ ββ ββ βββββββ βββββ βββββββ βββββ βββββ ββ-### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ-### ββ ββββββ ββ ββ ββ ββ ββ ββ ββ ββββββ ββ βββββββ ββ ββββ ββ ββββββ βββββββ βββββββ βββββββ ββ ββ βββββββ βββββββ-###-###+ ###+ ###+ ### βββββββ ββββββ ββββββ βββ βββ βββββ ββββββββ ββββββ ββββββ βββββββ βββ ββ ββββββ ββββββ βββββββ βββββββ βββββββ ββ ββ βββββββ ββ+ ### ββ ββ ββ ββ ββ ββββ ββββ ββ ββ ββ ββ ββ ββ ββ ββ ββββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ+ ### βββββ ββ ββ ββββββ ββ ββββ ββ βββββββ ββ ββ ββ ββββββ βββββ ββ ββ ββ ββββββ ββ ββ βββββββ βββββ βββββββ βββββ βββββ ββ+ ### ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ+ ### ββ ββββββ ββ ββ ββ ββ ββ ββ ββ ββββββ ββ βββββββ ββ ββββ ββ ββββββ βββββββ βββββββ βββββββ ββ ββ βββββββ βββββββ+ ###+ ###def formatOpenPoseStickIndices():"""generate dictionary of arrays, each containing the 'connect-the-dots' order to draw a given body segmentdiff --git a/freemocap/user_preferences.yaml b/freemocap/user_preferences.yamlnew file mode 100644index 00000000..c7d4a449--- /dev/null+++ b/freemocap/user_preferences.yaml@@ -0,0 +1,22 @@+default:+ path_to_save: C:\Users\jonma\Dropbox\GitKrakenRepos\freemocap+ dlc_config_paths: []+ rotations: {}+ parameters:+ exposure: -5+ resWidth: 640+ resHeight: 480+ framerate: 25+ codec: DIVX+saved:+ path_to_save: C:/Users/jonma/Dropbox/FreeMoCapProject+ rotations:+ 0: 0+ 2: 0+ 3: 0+ parameters:+ exposure: -7+ resWidth: 640+ resHeight: 480+ framerate: 30+ codec: DIVXdiff --git a/freemocap/webcamGUI.py b/freemocap/webcamGUI.pyindex 1a461071..4a71a63d 100644--- a/freemocap/webcamGUI.py+++ b/freemocap/webcamGUI.py@@ -31,7 +31,7 @@ def initialize(session, stage, board):if stage == 1:# create session ID- sessionID_in = datetime.datetime.now().strftime("sesh_%y-%m-%d_%H%M%S")+ sessionID_in = datetime.datetime.now().strftime("sesh_%Y-%m-%d_%H_%M_%S")session.sessionID = sessionID_in#load the parameters YAML and extract the saved parameters if possible, and the default otherwisediff --git a/freemocap_runme_script.py b/freemocap_runme_script.pyindex 2babb134..c93ce48b 100644--- a/freemocap_runme_script.py+++ b/freemocap_runme_script.py@@ -2,9 +2,12 @@ import freemocap as fmcfrom pathlib import Pathimport socket-dlcConfigPath = Path(r"C:\Users\jonma\Dropbox\DLC_Models\PinkGreenRedJugglingBalls-JSM-2021-05-31\config.yaml")-if socket.gethostname() == 'DESKTOP-DCG6K4F':- fmc.RunMe( stage=7, openPoseDummyRun=True, useDLC = True, dlcConfigPath=dlcConfigPath, recordVid = True)-else:- fmc.RunMe(sessionID = 'sesh_21-07-29_112223',stage = 7,useOpenPose=True, useMediaPipe=True)+fmc.RunMe( stage=5,+ useOpenPose=True,+ openPoseDummyRun=True,+ useMediaPipe=True,+ useDLC=False,+ recordVid = True,+ reconstructionConfidenceThreshold = 0.2,+ calVideoFrameLength = -1)diff --git a/requirements.txt b/requirements.txtindex 06f487ad..52d36442 100644--- a/requirements.txt+++ b/requirements.txt@@ -14,7 +14,8 @@ tensorflow-gpu>=2.0pyqt5>=5.15.4pyopengl>=3.1.5tf_slim>=1.1.0-deeplabcut[gui]>=2.2rc3+deeplabcut>=2.2ruamel.yaml>=0.15.0typed-ast<1.5,>=1.4.0+numpy<=1.19ffmpeg\ No newline at end of file