Skip to content

Free Motion Capture for Everyone πŸ’€βœ¨

TypeScript

requirements.txt works, I think!

Jon Matthisfd96f23f29f0
diff --git a/Cam5 b/Cam5
new file mode 100644
index 00000000..507e1981
Binary files /dev/null and b/Cam5 differ
diff --git a/parameters.yaml b/parameters.yaml
index aac3d904..92b9b5df 100644
--- a/parameters.yaml
+++ b/parameters.yaml
@@ -20,10 +20,10 @@ default:
saved:
rotations:
- 0: 270
- 1: 90
+ 0: 90
+ 1: 270
2: 90
- 3: 90
+ 3: 270
parameters:
exposure: -8
resWidth: 640
diff --git a/requirements.txt b/requirements.txt
index 431cfbeb..db0962a8 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,112 +1,20 @@
-# List required packages in this file, one per line.
-numpyabsl-py==0.12.0
-aniposelib==0.4.1
-astunparse==1.6.3
-attrs==21.2.0
-backcall==0.2.0
-cached-property==1.5.2
-cachetools==4.2.2
-certifi==2021.5.30
-chardet==4.0.0
-click==8.0.1
-colorama==0.4.4
-commonmark==0.9.1
-cycler==0.10.0
-Cython==0.29.23
-decorator==4.4.2
--e git+https://github.com/jonmatthis/DeepLabCut.git@74d3234efd8b7eca5dc317aee3c4f26dbf29a5b5#egg=deeplabcut
-filterpy==1.4.5
-flatbuffers==1.12
-gast==0.4.0
-google-auth==1.30.2
-google-auth-oauthlib==0.4.4
-google-pasta==0.2.0
-grpcio==1.34.1
-h5py==3.1.0
-idna==2.10
-imageio==2.9.0
-imageio-ffmpeg==0.4.4
-imgaug==0.4.0
-importlib-metadata==4.5.0
-imutils==0.5.4
-intel-openmp==2021.2.0
-ipython==7.24.1
-ipython-genutils==0.2.0
-jedi==0.18.0
-joblib==1.0.1
-keras-nightly==2.5.0.dev2021032900
-Keras-Preprocessing==1.1.2
-kiwisolver==1.3.1
-llvmlite==0.33.0
-Markdown==3.3.4
-matplotlib==3.1.3
-matplotlib-inline==0.1.2
-mediapipe==0.8.5
-moviepy==1.0.1
-msgpack==1.0.2
-msgpack-numpy==0.4.7.1
-networkx==2.5.1
-numba==0.50.1
-numexpr==2.7.3
-numpy==1.17.3
-oauthlib==3.1.1
-opencv-contrib-python==3.4.14.51
-opt-einsum==3.3.0
-pandas==1.2.4
-parso==0.8.2
-patsy==0.5.1
-pickleshare==0.7.5
-Pillow==8.2.0
-proglog==0.1.9
-prompt-toolkit==3.0.18
-protobuf==3.17.3
-psutil==5.8.0
-pyasn1==0.4.8
-pyasn1-modules==0.2.8
-Pygments==2.9.0
-PyOpenGL==3.1.5
-pyparsing==2.4.7
-PyQt5==5.15.4
-PyQt5-Qt5==5.15.2
-PyQt5-sip==12.9.0
-pyqtgraph==0.12.1
-python-dateutil==2.8.1
-pytz==2021.1
-PyWavelets==1.1.1
-PyYAML==5.4.1
-pyzmq==22.1.0
-requests==2.25.1
-requests-oauthlib==1.3.0
-rich==10.2.2
-rsa==4.7.2
-ruamel.yaml==0.17.8
-ruamel.yaml.clib==0.2.2
-scikit-image==0.18.1
-scikit-learn==0.24.2
-scipy==1.6.3
-Shapely==1.7.1
-six==1.15.0
-statsmodels==0.12.2
-tables==3.6.1
-tabulate==0.8.9
-tensorboard==2.5.0
-tensorboard-data-server==0.6.1
-tensorboard-plugin-wit==1.8.0
-tensorflow-estimator==2.5.0
-tensorflow-gpu==2.5.0
-tensorpack==0.9.8
-termcolor==1.1.0
-tf-slim==1.1.0
-threadpoolctl==2.1.0
-tifffile==2021.6.6
-toml==0.10.2
-tqdm==4.61.0
-traitlets==5.0.5
-typing-extensions==3.7.4.3
-urllib3==1.26.5
-wcwidth==0.2.5
-Werkzeug==2.0.1
-wincertstore==0.2
-wrapt==1.12.1
-wxPython==4.0.7.post2
-zipp==3.4.1
\ No newline at end of file
+-e git+https://github.com/jonmatthis/DeepLabCut.git@74d3234efd8b7eca5dc317aee3c4f26dbf29a5b5#egg=deeplabcut
+aniposelib==0.4.1
+h5py==3.3.0
+imutils==0.5.4
+matplotlib
+mediapipe==0.8.6
+numpy==1.17.3
+opencv-contrib-python==3.4.14.51
+pandas==1.2.5
+pyqtgraph==0.12.1
+PyYAML==5.4.1
+rich==10.4.0
+ruamel.base==1.0.0
+scipy==1.7.0
+toml==0.10.2
+tqdm==4.61.1
+tensorflow-gpu
+pyqt5
+pyopengl
+tf_slim
\ No newline at end of file
diff --git a/runme_FreeMoCap.py b/runme_FreeMoCap.py
index 31d107a3..e8583289 100644
--- a/runme_FreeMoCap.py
+++ b/runme_FreeMoCap.py
@@ -25,23 +25,23 @@ sesh = session.Session()
sesh.useOpenPose = True
sesh.useMediaPipe = False
-sesh.useDLC = False
+sesh.useDLC = True
if sesh.useDLC:
import deeplabcut as dlc
# sesh.dlcConfigPath = Path("C:\\Users\\jonma\\Dropbox\\GitKrakenRepos\\freemocap\\DLC_Models\\PinkGreenRedJugglingBalls-JSM-2021-05-31\\config.yaml")
sesh.dlcConfigPath = Path(
- "C:\\Users\\jonma\\Desktop\\freemocap\\DLC_Models\\PinkGreenRedJugglingBalls-JSM-2021-05-31\\config.yaml"
+ "C:\\Users\\jonma\\Desktop\\freemocap\\DLC_Models\\PinkGreenRedJugglingBalls-JSM-2021-05-31\\config.yaml",
)
# %% Inputs to edit
-stage = 6 # set your starting stage here (stage = 1 will run the pipeline from webcams)
+stage = 1 # set your starting stage here (stage = 1 will run the pipeline from webcams)
sesh.debug = False
sesh.sessionID = (
- "sesh_21_06_22_1_CyrWheel" # fill in if you are running from Stage 2 onwards
+ "" # fill in if you are running from Stage 2 onwards
)
if not sesh.sessionID:
diff --git a/runme_fmc_staged.py b/runme_fmc_staged.py
deleted file mode 100644
index 6053887f..00000000
--- a/runme_fmc_staged.py
+++ /dev/null
@@ -1,167 +0,0 @@
-from freemocap import createvideo, initialization, runcams, calibrate, fmc_mediapipe, fmc_openpose, fmc_deeplabcut, reconstruct3D, playskeleton, session
-from freemocap.fmc_pyqtgraph import PlayerDockedWindow
-
-from pathlib import Path
-import os
-
-from aniposelib.boards import CharucoBoard
-
-import numpy as np
-
-sesh = session.Session()
-
-
-sesh.useOpenPose= True
-sesh.useMediaPipe = False
-sesh.useDLC=True
-
-if sesh.useDLC:
- # import deeplabcut as dlc
- sesh.dlcConfigPath = Path("C:\\Users\\jonma\\Dropbox\\GitKrakenRepos\\freemocap\\DLC_Models\\PinkGreenRedJugglingBalls-JSM-2021-05-31\\config.yaml")
-
-
-
-# %% Inputs to edit
-stage = 1 #set your starting stage here (stage = 1 will run the pipeline from webcams)
-sesh.debug = False
-
-sesh.sessionID = 'sesh_21-05-31_111833' #fill in if you are running from Stage 2 onwards
-if not sesh.sessionID:
- dataFolder = Path.cwd()/'Data'
- subfolders = [ f.path for f in os.scandir(dataFolder) if f.is_dir() ] #copy-pasta from who knows where
- sesh.sessionID = Path(subfolders[-1]).stem #grab the name of the last folder in the list of subfolders
-
-board = CharucoBoard(7, 5,
- #square_length=1, # here, in mm but any unit works (JSM NOTE - just using '1' so resulting units will be in 'charuco squarelenghts`)
- #marker_length=.8,
- square_length = 121,
- marker_length = 96,
- marker_bits=4, dict_size=250)
-
-
-
-#sesh.input_stage = stage
-
-
-
-# %% Initialization
-
-initialization.initialize(sesh,stage,board)
-
-# %% Stage One
-if stage <= 1:
- print()
- print('Starting Video Recordings')
- runcams.RecordCams(sesh, sesh.cam_inputs, sesh.parameterDictionary, sesh.rotationInputs)
-else:
- print('Skipping Video Recording')
-
-
-# %% Stage Two
-if stage <= 2:
- print()
- print('Starting Video Syncing')
- runcams.SyncCams(sesh, sesh.timeStampData,sesh.numCamRange,sesh.vidNames,sesh.camIDs)
-else:
- print('Skipping Video Syncing')
-
-# %% Stage Three
-if stage <= 3:
- print()
- print('Starting Calibration')
- sesh.cgroup, sesh.mean_charuco_fr_mar_dim = calibrate.CalibrateCaptureVolume(sesh,board)
-else:
- print('Skipping Calibration')
-
-# %% Stage Four
-if 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=.1)
- np.save(sesh.dataArrayPath/'mediaPipeSkel_3d.npy', sesh.mediaPipeSkel_fr_mar_dim) #save data to npy
-
- if sesh.useOpenPose:
- fmc_openpose.runOpenPose(sesh, dummyRun=True)
- 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=.1)
- np.save(sesh.dataArrayPath/'openPoseSkel_3d.npy', sesh.openPoseskel_fr_mar_dim) #save data to npy
-
- if sesh.useDLC:
- sesh.syncedVidList = []
- for vid in sesh.syncedVidPath.glob('*.mp4'):
- sesh.syncedVidList.append(str(vid))
-
- dlc.analyze_videos(sesh.dlcConfigPath,sesh.syncedVidList, destfolder= sesh.dlcDataPath, save_as_csv=True)
-
- sesh.dlcData_nCams_nFrames_nImgPts_XYC = fmc_deeplabcut.parseDeepLabCut(sesh)
- sesh.dlc_fr_mar_dim = reconstruct3D.reconstruct3D(sesh,sesh.dlcData_nCams_nFrames_nImgPts_XYC, confidenceThreshold=.95)
- np.save(sesh.dataArrayPath/'deepLabCut_3d.npy', sesh.dlc_fr_mar_dim) #save data to npy
-
-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')
-
-
-
-# %% Stage Seven
-if stage <= 7:
- print('Starting Skeleton Plotting')
- # playskeleton.ReplaySkeleton_matplotlib(
- # sesh,
- # vidType=1,
- # startFrame=40,
- # azimuth=-90,
- # elevation=-80,
- # useOpenPose=useOpenPose,
- # useMediaPipe=useMediaPipe,
- # useDLC=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()
-
-else:
- print('Skipping Skeleton Plotting')
-
-# %% Stage Eight
-if stage <= 8:
- print()
- print('Starting Video Creation')
- createvideo.createVideo(sesh)
-else:
- print('Skipping Video Creation')
-
-
-
-f = 2
\ No newline at end of file
diff --git a/src/deeplabcut b/src/deeplabcut
new file mode 160000
index 00000000..74d3234e
--- /dev/null
+++ b/src/deeplabcut
@@ -0,0 +1 @@
+Subproject commit 74d3234efd8b7eca5dc317aee3c4f26dbf29a5b5