lambdaloop / anipose Goto Github PK
View Code? Open in Web Editor NEWππππΆ A toolkit for robust markerless 3D pose estimation
Home Page: http://anipose.org
License: BSD 2-Clause "Simplified" License
ππππΆ A toolkit for robust markerless 3D pose estimation
Home Page: http://anipose.org
License: BSD 2-Clause "Simplified" License
Hello again!
i was able to try to use a set of 12 videos from 12 cameras disposed arround a cube. As Charuco is robust to occlusion, i tried to calibrate all the cameras directly, though i came some issue:
I'm getting the following output (for the sake of simplicity, i just putted a few cameras):
[cam_0]
name = "1"
size = [ 1920, 1080,]
matrix = [ [ 1352.881831286193, 0.0, 959.5,], [ 0.0, 1352.881831286193, 539.5,], [ 0.0, 0.0, 1.0,],]
distortions = [ 0.06123193869724274, 0.0, 0.0, 0.0, 0.0,]
rotation = [ -0.9187013796846374, -0.1314637697651443, -0.01424130024745966,]
translation = [ -5.619613368346561, -657.6452591254599, -581.905597021176,]
[cam_4]
name = "2"
size = [ 1920, 1080,]
matrix = [ [ 1438.070128521826, 0.0, 959.5,], [ 0.0, 1438.070128521826, 539.5,], [ 0.0, 0.0, 1.0,],]
distortions = [ 0.2796506087772396, 0.0, 0.0, 0.0, 0.0,]
rotation = [ -0.7143773130873536, 1.382841802203809, 0.4807818109132332,]
translation = [ -675.5911522271351, -558.2044612932817, 62.95864975515903,]
[cam_10]
name = "8"
size = [ 1920, 1080,]
matrix = [ [ 1145.838629150258, 0.0, 959.5,], [ 0.0, 1145.838629150258, 539.5,], [ 0.0, 0.0, 1.0,],]
distortions = [ 0.07663770925150003, 0.0, 0.0, 0.0, 0.0,]
rotation = [ 0.1836874264634381, 0.3578359386120759, 0.6576390160822976,]
translation = [ -442.3095802361823, 29.51957730274389, -757.8845126085191,]
As you can see, the intrinsic parameter have a wide variation especially for the focal. I was wondering if by any chance, there is a way to impose those intrinsic parameters? I'm using intel realsense and i can get the intrinsic parameters by some other way.
Once again, thank you a lot for you time !
Hi,
Using windows 10, installed anipose today from "pip install anipose"
While trying to use anipose calibrate I get this error,
(dlc-windowsGPU) C:\deeplabcut\anipose3d recon>anipose calibrate
Calibrating...
C:\deeplabcut\anipose3d recon\session1\calibration\calibration.toml
C:\deeplabcut\anipose3d recon\session1\calibration\cam1cut.avi
100%|βββββββββββββββββββββββββββββ| 1056/1056 [00:19<00:00, 53.65it/s]
1056 boards detected
C:\deeplabcut\anipose3d recon\session1\calibration\cam2cut.avi
100%|βββββββββββββββββββββββββββββ| 1056/1056 [00:21<00:00, 50.00it/s]
1056 boards detected
defaultdict(<class 'int'>, {})
Traceback (most recent call last):
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\User\Anaconda3\envs\dlc-windowsGPU\Scripts\anipose.exe_main.py", line 9, in
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 764, in call
return self.main(*args, **kwargs)
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\site-packages\anipose\anipose.py", line 109, in calibrate
calibrate_all(config)
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\site-packages\anipose\common.py", line 168, in fun
return process_all(config, process_session, **args)
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\site-packages\anipose\common.py", line 153, in process_all
output[past_folders] = process_session(config, path, **args)
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\site-packages\anipose\calibrate.py", line 184, in process_session
n_samp_iter=100, n_samp_full=2000)
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\site-packages\calligator\cameras.py", line 1555, in calibrate_rows
rvecs, tvecs = get_initial_extrinsics(rtvecs)
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\site-packages\calligator\utils.py", line 174, in get_initial_extrinsics
extrinsics = compute_camera_matrices(rtvecs, pairs)
File "c:\users\user\anaconda3\envs\dlc-windowsgpu\lib\site-packages\calligator\utils.py", line 164, in compute_camera_matrices
source = pairs[0][0]
IndexError: list index out of range
a pickle file is created.
Thank you.
cristian
Hi guys,
After anipose analyze, filter, calibrate and triangulate I wanted to label 2d and 3d videos. 2d videos worked fine, but label-3d seemed to have a pkg_resource.ContextualVersionConflict with pyface.
Downgrading from pyface==7.0.1 to pyface==6.1.2 solved the problem, and 3d video looks great.
Thank you for these awesome tools.
Apologies if this has been addressed before, I had a look through the existing issues and nothing quite match.
Basically, the first few times I used anipose it worked great. Since then, however, more often than not I get bizarre results out of the calibration. Manually verifying the marker detections, they're usually >99% correct. The reprojection error is low, often <1. But when I check the calibration parameters, they don't make sense, e.g. the "cameras"* are both within a couple millimeters of the world origin and pointing in virtually the same direction. This in turn leads to implausible triangulation, i.e. the mouse that I'm tracking is either microscopic or several meters tall.
Am I doing something wrong? Or have I run into a pathological case for anipose's camera calibration algorithm? Calibration videos are here and here. Attached are the project config, the calibration target, the detections file, the resultant calibration file. I've tried things like turning fisheye on or off, turning ransac on and off, and changing the camera used for alignment, and get basically the same results each time.
*I'm actually using a single camera with a prism and a pair of mirrors to get two views of the subject. Could it be that anipose's camera calibration just doesn't work in this case? It does get it right (or at least comes up with a plausible solution) sometimes though.
Thanks in advance for your help and thanks for anipose in general, when I can get it to work it's great! Please let me know if you need any more info.
Hi,
I'm using 5 cameras and the standard charuco board for camera calibration. This results in 100's of detections per camera and anipose-calibrate
makes it to the point where it saves detections.pickle
. However, during the actual model estimation step, it crashes with the following
Calibrating...
/media/jon/Ephys Data Buffe/mouse_young_b/2020-09-03_mouse-young_b
/media/jon/Ephys Data Buffe/mouse_young_b/2020-09-03_mouse-young_b/calibration/calibration.toml
/media/jon/Ephys Data Buffe/mouse_young_b/2020-09-03_mouse-young_b/calibration/cam-0_2020-09-03T18_15_36.avi
100%|βββββββββββββββββββββββββββββ| 7043/7043 [02:45<00:00, 42.51it/s]
4676 boards detected
/media/jon/Ephys Data Buffe/mouse_young_b/2020-09-03_mouse-young_b/calibration/cam-1_2020-09-03T18_15_36.avi
100%|βββββββββββββββββββββββββββββ| 7043/7043 [03:04<00:00, 38.08it/s]
5149 boards detected
/media/jon/Ephys Data Buffe/mouse_young_b/2020-09-03_mouse-young_b/calibration/cam-2_2020-09-03T18_15_36.avi
100%|βββββββββββββββββββββββββββββ| 7043/7043 [03:12<00:00, 36.55it/s]
5403 boards detected
/media/jon/Ephys Data Buffe/mouse_young_b/2020-09-03_mouse-young_b/calibration/cam-3_2020-09-03T18_15_36.avi
100%|βββββββββββββββββββββββββββββ| 7043/7043 [03:01<00:00, 38.74it/s]
5122 boards detected
/media/jon/Ephys Data Buffe/mouse_young_b/2020-09-03_mouse-young_b/calibration/cam-4_2020-09-03T18_15_36.avi
100%|βββββββββββββββββββββββββββββ| 7043/7043 [03:02<00:00, 38.49it/s]
6628 boards detected
defaultdict(<class 'int'>, {('1', '4'): 4900, ('4', '1'): 4900})
Traceback (most recent call last):
File "/home/jon/anaconda3/envs/anipose/bin/anipose", line 8, in <module>
sys.exit(cli())
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/anipose/anipose.py", line 314, in run_data
calibrate_all(config)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/anipose/common.py", line 168, in fun
return process_all(config, process_session, **args)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/anipose/common.py", line 153, in process_all
output[past_folders] = process_session(config, path, **args)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/anipose/calibrate.py", line 203, in process_session
verbose=True)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/aniposelib/cameras.py", line 1563, in calibrate_rows
rvecs, tvecs = get_initial_extrinsics(rtvecs)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/aniposelib/utils.py", line 173, in get_initial_extrinsics
pairs = find_calibration_pairs(graph, source=0)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/aniposelib/utils.py", line 156, in find_calibration_pairs
for new in graph[item]:
TypeError: 'NoneType' object is not subscriptable
I've attached my detections.pickle
in case there is evidence of what corner case I've reached here...
Hello @lambdaloop ,
I am trying to run anipose triangulate
but I appear to be getting a shape error like so:
(anipose-2d-viz) hank-x299@hank-x299:/mnt/2TB/Dropbox/datasets/for_anipose/dalotiapose$ anipose triangulate
Triangulating points...
/mnt/2TB/Dropbox/datasets/for_anipose/dalotiapose/test_6_no_motor/pose-3d/dal_liom__2020_02_06_15_59_43.csv
Traceback (most recent call last):
File "/home/hank-x299/anaconda3/envs/anipose-2d-viz/bin/anipose", line 11, in <module>
load_entry_point('anipose', 'console_scripts', 'anipose')()
File "/home/hank-x299/anaconda3/envs/anipose-2d-viz/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/hank-x299/anaconda3/envs/anipose-2d-viz/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/hank-x299/anaconda3/envs/anipose-2d-viz/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/hank-x299/anaconda3/envs/anipose-2d-viz/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/hank-x299/anaconda3/envs/anipose-2d-viz/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/hank-x299/anaconda3/envs/anipose-2d-viz/lib/python3.6/site-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/hank-x299/anaconda3/envs/anipose-2d-viz/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/hank-x299/src/anipose/anipose/anipose.py", line 158, in triangulate
triangulate_all(config)
File "/home/hank-x299/src/anipose/anipose/common.py", line 168, in fun
return process_all(config, process_session, **args)
File "/home/hank-x299/src/anipose/anipose/common.py", line 153, in process_all
output[past_folders] = process_session(config, path, **args)
File "/home/hank-x299/src/anipose/anipose/triangulate.py", line 328, in process_session
fname_dict, output_fname)
File "/home/hank-x299/src/anipose/anipose/triangulate.py", line 237, in triangulate
points_3d = cgroup.triangulate(points_2d, progress=True)
File "/home/hank-x299/src/calligator/calligator/cameras.py", line 470, in triangulate
len(self.cameras), points.shape
AssertionError: Invalid points shape, first dim should be equal to number of cameras (4), but shape is (1, 8016, 2)
Why might my first dim not match my number of cameras? The output calibration.toml
file from anipose calibrate
is as follows:
[cam_0]
name = "18475997"
size = [ 720, 540,]
matrix = [ [ 1.579937897350622e-9, 0.0, 359.5,], [ 0.0, 1.579937897350622e-9, 269.5,], [ 0.0, 0.0, 1.0,],]
distortions = [ -3.144523897087529e-6, 0.0, 0.0, 0.0, 0.0,]
rotation = [ 0.00414603630815267, 0.1219035008662274, -0.2865174292114367,]
translation = [ 27691.78492496907, 18857.25662426044, -0.05080337727313677,]
[cam_1]
name = "19061101"
size = [ 720, 540,]
matrix = [ [ 3940085.308362053, 0.0, 359.5,], [ 0.0, 3940085.308362053, 269.5,], [ 0.0, 0.0, 1.0,],]
distortions = [ -2074.529286566875, 0.0, 0.0, 0.0, 0.0,]
rotation = [ 17557.08058349543, -737.7576224740999, -327.2018426416136,]
translation = [ 2016808012.038999, -253530721.0348125, 280339008.100099,]
[cam_2]
name = "19061600"
size = [ 720, 540,]
matrix = [ [ -166371.7609030413, 0.0, 359.5,], [ 0.0, -166371.7609030413, 269.5,], [ 0.0, 0.0, 1.0,],]
distortions = [ 26.6270212226631, 0.0, 0.0, 0.0, 0.0,]
rotation = [ 5.110329415919487, 3.386310472928838, -6.314679086461423,]
translation = [ 43310.79681988942, 47221.44031715184, 1046.281440359661,]
[cam_3]
name = "19061602"
size = [ 720, 540,]
matrix = [ [ 3477688.138059122, 0.0, 359.5,], [ 0.0, 3477688.138059122, 269.5,], [ 0.0, 0.0, 1.0,],]
distortions = [ -52.13839237435668, 0.0, 0.0, 0.0, 0.0,]
rotation = [ -3.878485957787288, 5.094652480771372, -14.79670715654272,]
translation = [ -99616.9443827019, -84179.57879928176, 9541.193737878069,]
[metadata]
adjusted = false
error = 1.312791890549888e+17
Thanks!
Is your feature request related to a problem? Please describe.
I'd like to use filtering (2D as well as 3D with distance constraints) but the description of the filter parameters is insufficient. While it is clear how to enable filters and what general kind of operation they will perform, I cannot find accurate descriptions of the filter parameters.
Describe the solution you'd like
Please clarify these points in the documentation:
scale_smooth
an scale_length
work exactly?
scale_smooth
mean? Is it smoothing kernel width, shape, ...?scale_length
work? I assume, if some constrained joint suddenly moves far away from its (by constraint) expected position, this somehow moves it back. How does scale_length
specify this behaviour? Is it a maximum percentage, the constraint can get longer before action is taken, or is it the strength with which a constraint "pulls" on a joint, ...?scale_length_weak
, n_deriv_smooth
, reproj_error_threshold
which also contribute to the optimization but are not mentioned at all in the docs. Please clarify what they mean.Additional context
Maybe it's just me not finding these descriptions but I have looked here (parameter list) and here (tutorial). As well as in the source code here (anipose) and here (optimization function in aniposelib) which also gives no comments / explanation.
Hello!
i just came accross an issue:
Describe the bug
DLT algorithm needs at least 6 points for pose estimation from 3D-2D point correspondences. (expected: 'count >= 6'), where
'count' is 5
must be greater than or equal to
'6' is 6
To Reproduce
I just used anipose calibration. I did exactly the same operations for several other groups of videos while everything went smooth.
Expected behavior
getting the calibration.toml file
here is a full log of what i obtained:
Calibrating...
/home/imagedpt/Documents/CN/Projets/Pipeline_pose_estimation/Anipose/calibration
/home/imagedpt/Documents/CN/Projets/Pipeline_pose_estimation/Anipose/calibration/calibration.toml
/home/imagedpt/Documents/CN/Projets/Pipeline_pose_estimation/Anipose/calibration/calib5_bigpat_30fps_cam11.avi
100%|βββββββββββββββββββββββββββββββ| 937/937 [02:04<00:00, 7.55it/s]
306 boards detected
/home/imagedpt/Documents/CN/Projets/Pipeline_pose_estimation/Anipose/calibration/calib5_bigpat_30fps_cam12.avi
100%|βββββββββββββββββββββββββββββββ| 937/937 [03:43<00:00, 4.19it/s]
518 boards detected
/home/imagedpt/Documents/CN/Projets/Pipeline_pose_estimation/Anipose/calibration/calib5_bigpat_30fps_cam5.avi
100%|βββββββββββββββββββββββββββββββ| 937/937 [02:42<00:00, 5.78it/s]
870 boards detected
/home/imagedpt/Documents/CN/Projets/Pipeline_pose_estimation/Anipose/calibration/calib5_bigpat_30fps_cam8.avi
100%|βββββββββββββββββββββββββββββββ| 937/937 [02:21<00:00, 6.61it/s]
902 boards detected
Traceback (most recent call last):
File "/home/imagedpt/.virtualenvs/anipose_test/bin/anipose", line 8, in <module>
sys.exit(cli())
File "/home/imagedpt/.virtualenvs/anipose_test/lib/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/imagedpt/.virtualenvs/anipose_test/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/imagedpt/.virtualenvs/anipose_test/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/imagedpt/.virtualenvs/anipose_test/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/imagedpt/.virtualenvs/anipose_test/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/imagedpt/.virtualenvs/anipose_test/lib/python3.6/site-packages/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/imagedpt/.virtualenvs/anipose_test/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/imagedpt/.virtualenvs/anipose_test/lib/python3.6/site-packages/anipose/anipose.py", line 115, in calibrate
calibrate_all(config)
File "/home/imagedpt/.virtualenvs/anipose_test/lib/python3.6/site-packages/anipose/common.py", line 168, in fun
return process_all(config, process_session, **args)
File "/home/imagedpt/.virtualenvs/anipose_test/lib/python3.6/site-packages/anipose/common.py", line 153, in process_all
output[past_folders] = process_session(config, path, **args)
File "/home/imagedpt/.virtualenvs/anipose_test/lib/python3.6/site-packages/anipose/calibrate.py", line 186, in process_session
n_samp_iter=100, n_samp_full=2000)
File "/home/imagedpt/.virtualenvs/anipose_test/lib/python3.6/site-packages/calligator/cameras.py", line 1551, in calibrate_rows
all_rows[i] = board.estimate_pose_rows(cam, row)
File "/home/imagedpt/.virtualenvs/anipose_test/lib/python3.6/site-packages/calligator/boards.py", line 343, in estimate_pose_rows
row['ids'])
File "/home/imagedpt/.virtualenvs/anipose_test/lib/python3.6/site-packages/calligator/boards.py", line 504, in estimate_pose_points
reprojectionError=30)
cv2.error: OpenCV(3.4.9) /io/opencv/modules/calib3d/src/calibration.cpp:1097: error: (-2:Unspecified error) in function 'void cvFindExtrinsicCameraParams2(const CvMat*, const CvMat*, const CvMat*, const CvMat*, CvMat*, CvMat*, int)'
> DLT algorithm needs at least 6 points for pose estimation from 3D-2D point correspondences. (expected: 'count >= 6'), where
> 'count' is 5
> must be greater than or equal to
> '6' is 6
(anipose_test)
i'm using this configuration :
[calibration]
# checkerboard / charuco / aruco
board_type = "checkerboard"
# width and height of grid
board_size = [9, 6]
# number of bits in the markers, if aruco/charuco
# board_marker_bits = 4
# number of markers in dictionary, if aruco/charuco
# board_marker_dict_number = 50
# length of marker side
# board_marker_length = 33 # mm
# If aruco, length of marker separation
# board_marker_separation_length = 1 # mm
# If charuco or checkerboard, square side length
board_square_side_length = 33 # mm
animal_calibration = false
fisheye = false
[triangulation]
triangulate = true
# cam_regex = '-cam([1-12])'
cam_regex = 'cam([0-9]*)'
ransac = true
optim = true
constraints = [
["base", "MCP1"], ["MCP1", "PIP1"], ["PIP1", "tip1"],
["base", "MCP2"], ["MCP2", "PIP2"], ["PIP2", "DIP2"], ["DIP2", "tip2"],
["base", "MCP3"], ["MCP3", "PIP3"], ["PIP3", "DIP3"], ["DIP3", "tip3"],
["base", "MCP4"], ["MCP4", "PIP4"], ["PIP4", "DIP4"], ["DIP4", "tip4"],
["base", "MCP5"], ["MCP5", "PIP5"], ["PIP5", "DIP5"], ["DIP5", "tip5"]
]
scale_smooth = 25
scale_length = 10
scale_length_weak = 2
reproj_error_threshold = 3
score_threshold = 0.6
n_deriv_smooth = 2
As the video i'm using contains faces of people that i cannot provide, i won't be able to send the videos used... though i can provide the pickle file : https://we.tl/t-RbrtQPrGcE
Once again, thank you a lot for you work,
Hi,
Thanks for your great work.
I am using a Ubuntu machine remotely. Currently, I stuck on the tutorial "https://anipose.readthedocs.io/en/latest/tutorial.html", where I run "anipose analyze", it will make my computer force shutdown, so I have to call my friend to go to the lab and open it again.
(anipose) robot1@yifu-x99:~/Shukai/hand-demo-unfilled$ anipose analyze
Analyzing videos...
/mnt/uhdd/shukai/hand-demo-unfilled/2019-08-02/pose-2d/2019-08-02-vid01-camA.h5
WARNING:tensorflow:From /home/robot1/anaconda3/envs/anipose/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /home/robot1/anaconda3/envs/anipose/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
OMP: Info #212: KMP_AFFINITY: decoding x2APIC ids.
OMP: Info #210: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info
OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: 0-15
OMP: Info #156: KMP_AFFINITY: 16 available OS procs
OMP: Info #157: KMP_AFFINITY: Uniform topology
OMP: Info #179: KMP_AFFINITY: 1 packages x 8 cores/pkg x 2 threads/core (8 total cores)
OMP: Info #214: KMP_AFFINITY: OS proc to physical thread map:
OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0 core 0 thread 0
OMP: Info #171: KMP_AFFINITY: OS proc 8 maps to package 0 core 0 thread 1
OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to package 0 core 1 thread 0
OMP: Info #171: KMP_AFFINITY: OS proc 9 maps to package 0 core 1 thread 1
OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to package 0 core 2 thread 0
OMP: Info #171: KMP_AFFINITY: OS proc 10 maps to package 0 core 2 thread 1
OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to package 0 core 3 thread 0
OMP: Info #171: KMP_AFFINITY: OS proc 11 maps to package 0 core 3 thread 1
OMP: Info #171: KMP_AFFINITY: OS proc 4 maps to package 0 core 4 thread 0
OMP: Info #171: KMP_AFFINITY: OS proc 12 maps to package 0 core 4 thread 1
OMP: Info #171: KMP_AFFINITY: OS proc 5 maps to package 0 core 5 thread 0
OMP: Info #171: KMP_AFFINITY: OS proc 13 maps to package 0 core 5 thread 1
OMP: Info #171: KMP_AFFINITY: OS proc 6 maps to package 0 core 6 thread 0
OMP: Info #171: KMP_AFFINITY: OS proc 14 maps to package 0 core 6 thread 1
OMP: Info #171: KMP_AFFINITY: OS proc 7 maps to package 0 core 7 thread 0
OMP: Info #171: KMP_AFFINITY: OS proc 15 maps to package 0 core 7 thread 1
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18697 thread 0 bound to OS proc set 0
WARNING:tensorflow:From /home/robot1/anaconda3/envs/anipose/lib/python3.7/site-packages/tensorflow/python/training/saver.py:1266: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
WARNING:tensorflow:From /home/robot1/anaconda3/envs/anipose/lib/python3.7/site-packages/tensorflow/python/training/saver.py:1266: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
0%| | 0/4395 [00:00<?, ?it/s]OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18767 thread 1 bound to OS proc set 1
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18835 thread 2 bound to OS proc set 2
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18836 thread 3 bound to OS proc set 3
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18837 thread 4 bound to OS proc set 4
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18838 thread 5 bound to OS proc set 5
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18839 thread 6 bound to OS proc set 6
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18840 thread 7 bound to OS proc set 7
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18841 thread 8 bound to OS proc set 8
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18842 thread 9 bound to OS proc set 9
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18843 thread 10 bound to OS proc set 10
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18844 thread 11 bound to OS proc set 11
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18845 thread 12 bound to OS proc set 12
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18846 thread 13 bound to OS proc set 13
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18847 thread 14 bound to OS proc set 14
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18848 thread 15 bound to OS proc set 15
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18849 thread 16 bound to OS proc set 0
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18768 thread 17 bound to OS proc set 1
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18850 thread 18 bound to OS proc set 2
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18851 thread 19 bound to OS proc set 3
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18852 thread 20 bound to OS proc set 4
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18853 thread 21 bound to OS proc set 5
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18854 thread 22 bound to OS proc set 6
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18855 thread 23 bound to OS proc set 7
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18856 thread 24 bound to OS proc set 8
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18857 thread 25 bound to OS proc set 9
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18858 thread 26 bound to OS proc set 10
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18859 thread 27 bound to OS proc set 11
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18860 thread 28 bound to OS proc set 12
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18862 thread 30 bound to OS proc set 14
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18861 thread 29 bound to OS proc set 13
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18863 thread 31 bound to OS proc set 15
OMP: Info #250: KMP_AFFINITY: pid 18697 tid 18864 thread 32 bound to OS proc set 0
18%|βββββββββββ | 774/4395 [03:26<16:55, 3.57it/s]
It will stuck here, and no matter I use either remote viewer, such as VNC or teamviewer, or run fully on SSH in terminal.
I know it is a tricky problem, any help would be appreciated. If you need further information, I would reply shortly.
Is your feature request related to a problem? Please describe.
on MacOS, Catalina
conda env with deeplabcut and calligator installed as follows:
DLC-calligator.yaml
# DLC-calligator.yaml
#
# install: conda env create -f DLC-calligator.yaml
# update: conda env update -f DLC-calligator.yaml
name: DLC-calligator
dependencies:
- python=3.7
- pip
- jupyter
- nb_conda
- tensorflow==1.13.1
- wxpython
- Shapely
- pip:
- deeplabcut
- calligator
Error:
When trying to install anipose with pip inside this env, there are issues with installing lapsolver
:
mwmathis@Mackenzies-MacBook-Pro Desktop % pip install anipose
Collecting anipose
Using cached anipose-0.6.6-py3-none-any.whl (54 kB)
Collecting scikit-video
Using cached scikit_video-1.1.11-py2.py3-none-any.whl (2.3 MB)
Requirement already satisfied: calligator>=0.3.2 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from anipose) (0.3.2)
Requirement already satisfied: opencv-python in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from anipose) (3.4.9.31)
Requirement already satisfied: scipy in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from anipose) (1.4.1)
Requirement already satisfied: tqdm in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from anipose) (4.43.0)
Requirement already satisfied: pandas in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from anipose) (1.0.1)
Requirement already satisfied: click in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from anipose) (7.0)
Requirement already satisfied: toml in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from anipose) (0.10.0)
Requirement already satisfied: numpy in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from anipose) (1.16.4)
Requirement already satisfied: deeplabcut>=2.0.4.1 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from anipose) (2.1.6.2)
Collecting lapsolver>=1.0.2
Using cached lapsolver-1.1.0.tar.gz (261 kB)
Requirement already satisfied: pillow in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from scikit-video->anipose) (7.0.0)
Requirement already satisfied: numba in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from calligator>=0.3.2->anipose) (0.48.0)
Requirement already satisfied: opencv-contrib-python~=3.4 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from calligator>=0.3.2->anipose) (3.4.9.31)
Requirement already satisfied: python-dateutil>=2.6.1 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from pandas->anipose) (2.8.1)
Requirement already satisfied: pytz>=2017.2 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from pandas->anipose) (2019.3)
Requirement already satisfied: scikit-learn in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (0.22.2.post1)
Requirement already satisfied: tensorpack>=0.9.7.1 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (0.9.9)
Requirement already satisfied: six in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (1.14.0)
Requirement already satisfied: setuptools in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (45.2.0.post20200210)
Requirement already satisfied: chardet in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (3.0.4)
Requirement already satisfied: ipython in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (7.12.0)
Requirement already satisfied: wheel in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (0.34.2)
Requirement already satisfied: ruamel.yaml~=0.15 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (0.16.10)
Requirement already satisfied: easydict in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (1.9)
Requirement already satisfied: moviepy in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (1.0.1)
Requirement already satisfied: h5py~=2.7 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (2.10.0)
Requirement already satisfied: tables in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (3.6.1)
Requirement already satisfied: scikit-image in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (0.16.2)
Requirement already satisfied: patsy in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (0.5.1)
Requirement already satisfied: statsmodels in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (0.11.1)
Requirement already satisfied: certifi in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (2019.11.28)
Requirement already satisfied: imgaug in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (0.4.0)
Requirement already satisfied: pyyaml>=5.1 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (5.3)
Requirement already satisfied: requests in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (2.23.0)
Requirement already satisfied: matplotlib==3.0.3 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (3.0.3)
Requirement already satisfied: ipython-genutils in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (0.2.0)
Requirement already satisfied: intel-openmp in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from deeplabcut>=2.0.4.1->anipose) (2019.0)
Requirement already satisfied: llvmlite<0.32.0,>=0.31.0dev0 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from numba->calligator>=0.3.2->anipose) (0.31.0)
Requirement already satisfied: joblib>=0.11 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from scikit-learn->deeplabcut>=2.0.4.1->anipose) (0.14.1)
Requirement already satisfied: tabulate>=0.7.7 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from tensorpack>=0.9.7.1->deeplabcut>=2.0.4.1->anipose) (0.8.6)
Requirement already satisfied: psutil>=5 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from tensorpack>=0.9.7.1->deeplabcut>=2.0.4.1->anipose) (5.7.0)
Requirement already satisfied: msgpack>=0.5.2 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from tensorpack>=0.9.7.1->deeplabcut>=2.0.4.1->anipose) (1.0.0)
Requirement already satisfied: pyzmq>=16 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from tensorpack>=0.9.7.1->deeplabcut>=2.0.4.1->anipose) (18.1.1)
Requirement already satisfied: termcolor>=1.1 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from tensorpack>=0.9.7.1->deeplabcut>=2.0.4.1->anipose) (1.1.0)
Requirement already satisfied: msgpack-numpy>=0.4.4.2 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from tensorpack>=0.9.7.1->deeplabcut>=2.0.4.1->anipose) (0.4.4.3)
Requirement already satisfied: traitlets>=4.2 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from ipython->deeplabcut>=2.0.4.1->anipose) (4.3.3)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from ipython->deeplabcut>=2.0.4.1->anipose) (3.0.3)
Requirement already satisfied: jedi>=0.10 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from ipython->deeplabcut>=2.0.4.1->anipose) (0.16.0)
Requirement already satisfied: backcall in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from ipython->deeplabcut>=2.0.4.1->anipose) (0.1.0)
Requirement already satisfied: pickleshare in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from ipython->deeplabcut>=2.0.4.1->anipose) (0.7.5)
Requirement already satisfied: appnope; sys_platform == "darwin" in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from ipython->deeplabcut>=2.0.4.1->anipose) (0.1.0)
Requirement already satisfied: decorator in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from ipython->deeplabcut>=2.0.4.1->anipose) (4.4.1)
Requirement already satisfied: pexpect; sys_platform != "win32" in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from ipython->deeplabcut>=2.0.4.1->anipose) (4.8.0)
Requirement already satisfied: pygments in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from ipython->deeplabcut>=2.0.4.1->anipose) (2.5.2)
Requirement already satisfied: ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.9" in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from ruamel.yaml~=0.15->deeplabcut>=2.0.4.1->anipose) (0.2.0)
Requirement already satisfied: proglog<=1.0.0 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from moviepy->deeplabcut>=2.0.4.1->anipose) (0.1.9)
Requirement already satisfied: imageio<3.0,>=2.5; python_version >= "3.4" in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from moviepy->deeplabcut>=2.0.4.1->anipose) (2.8.0)
Requirement already satisfied: imageio-ffmpeg>=0.2.0; python_version >= "3.4" in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from moviepy->deeplabcut>=2.0.4.1->anipose) (0.4.1)
Requirement already satisfied: numexpr>=2.6.2 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from tables->deeplabcut>=2.0.4.1->anipose) (2.7.1)
Requirement already satisfied: networkx>=2.0 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from scikit-image->deeplabcut>=2.0.4.1->anipose) (2.4)
Requirement already satisfied: PyWavelets>=0.4.0 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from scikit-image->deeplabcut>=2.0.4.1->anipose) (1.1.1)
Requirement already satisfied: Shapely in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from imgaug->deeplabcut>=2.0.4.1->anipose) (1.6.4.post2)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from requests->deeplabcut>=2.0.4.1->anipose) (1.25.8)
Requirement already satisfied: idna<3,>=2.5 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from requests->deeplabcut>=2.0.4.1->anipose) (2.9)
Requirement already satisfied: kiwisolver>=1.0.1 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from matplotlib==3.0.3->deeplabcut>=2.0.4.1->anipose) (1.1.0)
Requirement already satisfied: cycler>=0.10 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from matplotlib==3.0.3->deeplabcut>=2.0.4.1->anipose) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from matplotlib==3.0.3->deeplabcut>=2.0.4.1->anipose) (2.4.6)
Requirement already satisfied: wcwidth in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython->deeplabcut>=2.0.4.1->anipose) (0.1.8)
Requirement already satisfied: parso>=0.5.2 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from jedi>=0.10->ipython->deeplabcut>=2.0.4.1->anipose) (0.6.1)
Requirement already satisfied: ptyprocess>=0.5 in /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages (from pexpect; sys_platform != "win32"->ipython->deeplabcut>=2.0.4.1->anipose) (0.6.0)
Building wheels for collected packages: lapsolver
Building wheel for lapsolver (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-install-_qt4q6_o/lapsolver/setup.py'"'"'; __file__='"'"'/private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-install-_qt4q6_o/lapsolver/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-wheel-2gzfjn4b
cwd: /private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-install-_qt4q6_o/lapsolver/
Complete output (77 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.7
creating build/lib.macosx-10.9-x86_64-3.7/lapsolver
copying lapsolver/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/lapsolver
creating build/lib.macosx-10.9-x86_64-3.7/lapsolver/tests
copying lapsolver/tests/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/tests
copying lapsolver/tests/test_files.py -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/tests
copying lapsolver/tests/test_dense.py -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/tests
running egg_info
writing lapsolver.egg-info/PKG-INFO
writing dependency_links to lapsolver.egg-info/dependency_links.txt
writing top-level names to lapsolver.egg-info/top_level.txt
reading manifest file 'lapsolver.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'lapsolver.egg-info/SOURCES.txt'
creating build/lib.macosx-10.9-x86_64-3.7/lapsolver/data
creating build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs0.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs1.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs10.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs2.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs3.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs4.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs5.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs6.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs7.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs8.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs9.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
creating build/lib.macosx-10.9-x86_64-3.7/lapsolver/etc
copying lapsolver/etc/benchmark-dtype-int.png -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/etc
copying lapsolver/etc/benchmark-dtype-numpy.float32.png -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/etc
running build_ext
Traceback (most recent call last):
File "/private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-install-_qt4q6_o/lapsolver/setup.py", line 22, in run
out = subprocess.check_output(['cmake', '--version'])
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/subprocess.py", line 411, in check_output
**kwargs).stdout
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-install-_qt4q6_o/lapsolver/setup.py", line 88, in <module>
keywords='hungarian munkres kuhn linear-sum-assignment bipartite-graph lap'
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 223, in run
self.run_command('build')
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-install-_qt4q6_o/lapsolver/setup.py", line 25, in run
", ".join(e.name for e in self.extensions))
RuntimeError: CMake must be installed to build the following extensions: lapsolverc
----------------------------------------
ERROR: Failed building wheel for lapsolver
Running setup.py clean for lapsolver
Failed to build lapsolver
Installing collected packages: scikit-video, lapsolver, anipose
Running setup.py install for lapsolver ... error
ERROR: Command errored out with exit status 1:
command: /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-install-_qt4q6_o/lapsolver/setup.py'"'"'; __file__='"'"'/private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-install-_qt4q6_o/lapsolver/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-record-ppsvuzrf/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/include/python3.7m/lapsolver
cwd: /private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-install-_qt4q6_o/lapsolver/
Complete output (79 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.7
creating build/lib.macosx-10.9-x86_64-3.7/lapsolver
copying lapsolver/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/lapsolver
creating build/lib.macosx-10.9-x86_64-3.7/lapsolver/tests
copying lapsolver/tests/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/tests
copying lapsolver/tests/test_files.py -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/tests
copying lapsolver/tests/test_dense.py -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/tests
running egg_info
writing lapsolver.egg-info/PKG-INFO
writing dependency_links to lapsolver.egg-info/dependency_links.txt
writing top-level names to lapsolver.egg-info/top_level.txt
reading manifest file 'lapsolver.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'lapsolver.egg-info/SOURCES.txt'
creating build/lib.macosx-10.9-x86_64-3.7/lapsolver/data
creating build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs0.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs1.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs10.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs2.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs3.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs4.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs5.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs6.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs7.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs8.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
copying lapsolver/data/dense/costs9.npz -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/data/dense
creating build/lib.macosx-10.9-x86_64-3.7/lapsolver/etc
copying lapsolver/etc/benchmark-dtype-int.png -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/etc
copying lapsolver/etc/benchmark-dtype-numpy.float32.png -> build/lib.macosx-10.9-x86_64-3.7/lapsolver/etc
running build_ext
Traceback (most recent call last):
File "/private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-install-_qt4q6_o/lapsolver/setup.py", line 22, in run
out = subprocess.check_output(['cmake', '--version'])
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/subprocess.py", line 411, in check_output
**kwargs).stdout
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-install-_qt4q6_o/lapsolver/setup.py", line 88, in <module>
keywords='hungarian munkres kuhn linear-sum-assignment bipartite-graph lap'
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/mwmathis/opt/anaconda3/envs/DLC-anipose/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-install-_qt4q6_o/lapsolver/setup.py", line 25, in run
", ".join(e.name for e in self.extensions))
RuntimeError: CMake must be installed to build the following extensions: lapsolverc
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-install-_qt4q6_o/lapsolver/setup.py'"'"'; __file__='"'"'/private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-install-_qt4q6_o/lapsolver/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/ct/4w_vk2wn10xb_xj2fm7d6vqc0000gn/T/pip-record-ppsvuzrf/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mwmathis/opt/anaconda3/envs/DLC-anipose/include/python3.7m/lapsolver Check the logs for full command output.
(DLC-anipose) mwmathis@Mackenzies-MacBook-Pro Desktop %
I also noticed that there is a bit of an issue with the 3 packages, such that order of operation matters a bit, which is suboptimal: can anipose be pinged to 'opencv-python~=3.4'
?
DLC setup requires: 'opencv-python~=3.4'
calligator requires: 'opencv-python~=3.4', 'opencv-contrib-python~=3.4'
anipose just has: 'opencv-python'
When I print out the calibration.png from here https://drive.google.com/drive/u/1/folders/18qGbHyiSJ2au9sFXScZ63EZ83PtC1-ld, it measures 28 mm instead of 25 mm in as in the toml config file. This is likely because it doesn't have the margins that are shown in the calibration clipboard videos.
Hello,
I looked at the data set; βanipose-shared: hand-demoβ of the anipose tutorial (great, thank you for this!) and I noticed one network was trained on all views/cameras. I was wondering if it is also possible to use separate trained networks for each camera?
Best regards,
Maud
I made some image processing scripts to take a raw video with claps in it and synchronize several cameras based on the audio. I'm not sure if there is a better way to do it, but the documentation starts at three synchronized videos so I thought those might be useful to getting unedited video into the anipose format.
Also is anyone maintaining this repository? @lambdaloop @katierupp @tuthill-lab
I encounter problems with retrieving reliable 3D coordinates of markers which are visible in a different amount of cameras.
For example:
6 markers (marker 1-6) are visible in the same cameras (let's say camera 1 and 2, with likelihood > 0.95), when visualizing the 3D coordinates of these markers, these look reliable. However, when marker 7 is visible in camera 1 and 2 (likelihood > 0.95) for a certain amount of time, this marker location seems reliable when comparing the location of marker 1-6 and marker 7. But when marker 7 becomes visible in camera 1, 2 and 3 (likelihood > 0.95) later on, this marker shifts away from the other markers (marker 1-6). The location of marker 7 is not longer logical when comparing this location to the location of marker 1-6.
Would you have a suggestion to solve this?
I already applied the 'filter' to only use 2D coordinates of markers with a high likelihood (> 0.95)
to determine the 3Dcoordinates.
Does it has something to do with filtering? Is there some more documentation about the different 2D/3D filter options? or does it has something to do with the calibration?
I added a zip folder with the calibration.toml, config.toml, pose-2d and pose-3d excels of sample data
Maud.zip
Hello,
I've been having an issue running the anipose calibrate
command. I am using a Conda environment that can run DeepLabCut, on Ubuntu 18.04. When trying to run anipose calibrate
I get the following error:
(dlc-anipose) hank-x299@hank-x299:~/src/dlc-utils/examples/beetlepose$ anipose calibrate
Calibrating...
/home/hank-x299/src/dlc-utils/examples/beetlepose/test_1_no_motor
Traceback (most recent call last):
File "/home/hank-x299/anaconda3/envs/dlc-anipose/bin/anipose", line 11, in <module>
load_entry_point('anipose', 'console_scripts', 'anipose')()
File "/home/hank-x299/anaconda3/envs/dlc-anipose/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/hank-x299/anaconda3/envs/dlc-anipose/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/hank-x299/anaconda3/envs/dlc-anipose/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/hank-x299/anaconda3/envs/dlc-anipose/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/hank-x299/anaconda3/envs/dlc-anipose/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/hank-x299/anaconda3/envs/dlc-anipose/lib/python3.6/site-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/hank-x299/anaconda3/envs/dlc-anipose/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/hank-x299/src/anipose/anipose/anipose.py", line 115, in calibrate
calibrate_all(config)
File "/home/hank-x299/src/anipose/anipose/common.py", line 168, in fun
return process_all(config, process_session, **args)
File "/home/hank-x299/src/anipose/anipose/common.py", line 153, in process_all
output[past_folders] = process_session(config, path, **args)
File "/home/hank-x299/src/anipose/anipose/calibrate.py", line 126, in process_session
name = get_cam_name(config, vid)
File "/home/hank-x299/src/anipose/anipose/common.py", line 72, in get_cam_name
name = match.groups()[0]
IndexError: tuple index out of range
My file structure is as follows:
(dlc-anipose) hank-x299@hank-x299:~/src/dlc-utils/examples/beetlepose$ tree
.
βββ config.toml
βββ test_1_no_motor
βββ calibration
βΒ Β βββ dal_liom_guid_18475996_2020_02_06_23_26_17.mp4
βΒ Β βββ dal_liom_guid_18475997_2020_02_06_23_26_18.mp4
βΒ Β βββ dal_liom_guid_19061101_2020_02_06_23_26_20.mp4
βΒ Β βββ dal_liom_guid_19061600_2020_02_06_23_26_22.mp4
βΒ Β βββ dal_liom_guid_19061602_2020_02_06_23_26_23.mp4
βββ videos-raw
βββ dal_liom_guid_18475996_2020_02_06_11_22_17.mp4
βββ dal_liom_guid_18475997_2020_02_06_11_22_02.mp4
βββ dal_liom_guid_19061101_2020_02_06_11_21_52.mp4
βββ dal_liom_guid_19061600_2020_02_06_11_21_40.mp4
βββ dal_liom_guid_19061602_2020_02_06_11_21_26.mp4
My config.toml
file looks like so:
project = "beetlepose"
path = "/home/hank-x299/src/dlc-utils/examples/beetlepose"
nesting = 1
video_extension = "mp4"
# regex matches 8-digits proceeding a "_":
[triangulation]
cam_regex = "guid_[0-9]{8}"
[calibration]
# checkerboard / charuco / aruco
board_type = "checkerboard"
# width and height of grid
board_size = [6, 6]
# length of marker side
board_marker_length = 0.3 # mm
# If charuco or checkerboard, square side length
board_square_side_length = 0.3 # mm
animal_calibration = true
Given the above, why might I be getting IndexError: tuple index out of range
?
Thanks!
Hi,
I encounter a problem when a want to calibrate my cameras.
Videos containing checkerboard are analyzed and boards are detected but then an error occurs (cv2.error).
I tried to downgrade the opencv version to 3.4 as you mentioned in a previous issue but the same error message appears.
C:\Users\ormen\Desktop\anipose\Patient1\Nothing\calibration\Cam1_Calibration_1_10-29-19_11-29-34.avi
100%|βββββββββββββββββββββββββββββ| 1482/1482 [01:52<00:00, 13.23it/s]
1346 boards detected
C:\Users\ormen\Desktop\anipose\Patient1\Nothing\calibration\Cam2_Calibration_1_10-29-19_11-29-34.avi
100%|βββββββββββββββββββββββββββββ| 1482/1482 [01:20<00:00, 18.51it/s]
1394 boards detected
Traceback (most recent call last):
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\ormen\Anaconda3\envs\dlc-windowsGPU\Scripts\anipose.exe_main.py", line 9, in
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 764, in call
return self.main(*args, **kwargs)
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\site-packages\anipose\anipose.py", line 108, in calibrate
calibrate_all(config)
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\site-packages\anipose\common.py", line 168, in fun
return process_all(config, process_session, **args)
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\site-packages\anipose\common.py", line 153, in process_all
output[past_folders] = process_session(config, path, **args)
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\site-packages\anipose\calibrate.py", line 183, in process_session
n_samp_iter=100, n_samp_full=2000)
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\site-packages\calligator\cameras.py", line 1546, in calibrate_rows
all_rows[i] = board.estimate_pose_rows(cam, row)
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\site-packages\calligator\boards.py", line 333, in estimate_pose_rows
row['ids'])
File "c:\users\ormen\anaconda3\envs\dlc-windowsgpu\lib\site-packages\calligator\boards.py", line 465, in estimate_pose_points
reprojectionError=30)
cv2.error: OpenCV(3.4.7) C:\projects\opencv-python\opencv\modules\calib3d\src\solvepnp.cpp:216: error: (-215:Assertion failed) npoints >= 4 && npoints == std::max(ipoints.checkVector(2, CV_32F), ipoints.checkVector(2, CV_64F)) in function 'cv::solvePnPRansac'
Do you have an idea what can be the problem?
Best,
Y
Hi,
I am having a problem with calibration and attached the output of anipose calibrate below:
Thank you
D:\workspac_deepcut\local_DLC\FN 10-02-2020 - Short Clip-Chrissy-2020-10-08\videos\anipose_test\test1\calibration\TEST5-20201117T115653-115904_cam5.mp4
100%|ββββββββββββββββββββββββββββ| 3960/3960 [00:35<00:00, 112.75it/s]
841 boards detected
defaultdict(<class 'int'>, {})
Traceback (most recent call last):
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\rahmank\AppData\Local\Continuum\anaconda3\envs\anipose\Scripts\anipose.exe_main.py", line 7, in
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\click\core.py", line 829, in call
return self.main(*args, **kwargs)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\click\decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\anipose\anipose.py", line 115, in calibrate
calibrate_all(config)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\anipose\common.py", line 168, in fun
return process_all(config, process_session, **args)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\anipose\common.py", line 125, in process_all
output[()] = process_session(config, pipeline_prefix, **args)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\anipose\calibrate.py", line 187, in process_session
verbose=True)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\aniposelib\cameras.py", line 1560, in calibrate_rows
rvecs, tvecs = get_initial_extrinsics(rtvecs)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\aniposelib\utils.py", line 173, in get_initial_extrinsics
pairs = find_calibration_pairs(graph, source=0)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\aniposelib\utils.py", line 156, in find_calibration_pairs
for new in graph[item]:
TypeError: 'NoneType' object is not subscriptable
Windows 10
Using Anaconda
When I open a terminal in Anaconda to install anipose through pip install i get the following error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Milestone\Anaconda3\envs\anipose\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\MILEST1\AppData\Local\Temp\pip-install-xhsfiply\tables\setup.py'"'"'; file='"'"'C:\Users\MILEST1\AppData\Local\Temp\pip-install-xhsfiply\tables\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: C:\Users\MILEST1\AppData\Local\Temp\pip-install-xhsfiply\tables1\AppData\Local\Temp\pip-install-xhsfiply\tables\setup.py", line 597, in
Complete output (11 lines):
* Using Python 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)]
* USE_PKGCONFIG: False
* Found HDF5 using system PATH ('C:\Users\Milestone\Anaconda3\Library\bin')
* Found conda env: C:\Users\Milestone\Anaconda3\envs\anipose
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\MILEST
hdf5_version = get_hdf5_version(hdf5_header)
File "C:\Users\MILEST~1\AppData\Local\Temp\pip-install-xhsfiply\tables\setup.py", line 350, in get_hdf5_version
major_version = int(re.split("\s*", line)[2])
ValueError: invalid literal for int() with base 10: 'd'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I have tried to update pip but didn't work. Any idea what is happening?
Hello,
A few weeks ago, i was asking about the triangulation method you were using. To which you answered using RANSAC and least-means-square method (i suppose it's getting the point minimising the reprojections?).
I tried to look again into your code and the function called when the ransac flag is set (triangulate_ransac) does seem to only reformat the entry. Also in your function (triangulate_simple) you are using the svd method to solve the triangulation, though my mathematical background isn't advanced enough to be sure of what is beeing done exactly. Is that triangulating optimaly given all the cameras intrinsic and extrinsic matrix and the 2d points for each one?
Could you give me some explaination of the strategy beeing used there ?
I did try to use your pipeline in order to triangulate from multiple cameras. I annotated 51 frames on 5 cameras using deeplabcut. The triangulation from 5 of the cameras with reprojection onto the others helped me annotating 51 frames for a total 11 cameras. (which have been calibrated with the charuco method which led to weird intrinsec parameters, though they were the best qualitative reprojection i could see while proceding on a few reprojections of the pattern using opencv triangulation (by pair)). The reprojection was quite impressive and most of the time, only a few modifications were required.
After proceding to the few corrections of the annotations, i wanted to proceed on triangulating then reprojecting every view together in order to train a robust network using deeplabcut.
Unfortunnately, results are quite random and i have absolutely no idea how to fix it.
https://www.pixenli.com/image/lzSAoGAq
I'll let you the anipose pipeline i used to triangulate and the results i got.
https://we.tl/t-MsJF3ki9sG
Though the triangulation with five cameras (1,2,7,9,12) was working pretty well and was computed in less than 4 seconds, the calibration with 11 cameras took arround 4 minutes on the same computer.
PS: the camera 5 has been erased as the camera was never able to see the hand on the videos i have, the configuration file has been adapted consequently.
Thank you a lot for you work once again !
EDIT
I continued my research in order to isolate the problem. There seem to be an issue when using up to 10 cameras, it seems to work fine :
Exemple using : cam [1,2,3,4,6,7,8,9,10,12] and [1,2,3,4,6,7,8,9,11,12]
Though as soon as i'm using 11 cameras together, the results became messy and is not usable at all
Hello,
First of all, thank your for your incredible work. I was looking into your triangulation method though i couldn't really understand it... Could you describe the method you are using to triangulate with multiple views ? Are you using some RANSAC for filtering some bad tracking ?
Thank you a lot for your time
When installing on Ubuntu 18.04, if opencv-python is already installed then when opencv-contrib-python is installed, aruco and the rest of the development open-cv modules are not installed due to the package conflict. This could be documented in the installation possibly.
Currently instructions indicate that deeplabcut should be installed as a pip dependency but don't go into how to get a CPU or GPU dlc version. DLC solved this by just making conda config files for both options. I've pasted a conda specification file that I used to install a anipose-modified GPU DLC installation. Might be useful to supply this (along with CPU version that I didn't make) for easy install.
# FIRST: INSTALL CORRECT DRIVER for GPU, see https://stackoverflow.com/questions/30820513/what-is-the-correct-version-of-cuda-for-my-nvidia-driver/30820690
#
# install: conda env create -f anipose.yaml
# update: conda env update -f anipose.yaml
name: anipose
dependencies:
- python=3.7
- pip
- tensorflow-gpu==1.13.1
- cudnn=7
- wxpython
- jupyter
- nb_conda
- Shapely
- ffmpeg
- mayavi
- pip:
- deeplabcut
- anipose
Hi,
I decided to 'crop' my 3 cameras views (same camera and lenses) and I set exactly the same offset to each camera.
Should I precise the offset in my config.toml file if I redo the calibration?
Since the offset is exactly the same in each camera I guess that it's like having the full view of each camera or am I wrong?
Best,
Y
Hello,
I'm having some issues trying to execute anipose filter-3d
. I consistently get a numpy
error like so:
(anipose-2d-viz) hank-x299@hank-x299:/mnt/2TB/Dropbox/datasets/for_anipose/dalotiapose$ anipose filter-3d
Filtering tracked points...
/mnt/2TB/Dropbox/datasets/for_anipose/dalotiapose/test_1_no_motor/pose-3d-filtered/dal_liom__2020_02_06_11_21.csv
/home/hank-x299/anaconda3/envs/anipose-2d-viz/lib/python3.6/site-packages/numpy/lib/function_base.py:3405: RuntimeWarning: Invalid value encountered in median
r = func(a, **kwargs)
I am using numpy==1.16.4
. My 2D-tracking after filtering looks good, and my calibration.toml
file is like so:
[cam_0]
name = "18475997"
size = [ 720, 540,]
matrix = [ [ 9.638756622617622, 0.0, 359.5,], [ 0.0, 9.638756622617622, 269.5,], [ 0.0, 0.0, 1.0,],]
distortions = [ 0.002321125597023245, 0.0, 0.0, 0.0, 0.0,]
rotation = [ 0.07377960282678943, 0.00883013460354334, -0.04760874463639168,]
translation = [ -0.2786317828208055, 0.3293169341307745, -0.03600747822987863,]
[cam_1]
name = "19061101"
size = [ 720, 540,]
matrix = [ [ 24.96617363229602, 0.0, 359.5,], [ 0.0, 24.96617363229602, 269.5,], [ 0.0, 0.0, 1.0,],]
distortions = [ 0.0003751601954273957, 0.0, 0.0, 0.0, 0.0,]
rotation = [ -0.07387913606012508, 0.01903475208959475, 0.1710721036246948,]
translation = [ -1.384724062163185, 0.1546314401368329, 0.05040677950337349,]
[cam_2]
name = "19061600"
size = [ 720, 540,]
matrix = [ [ 9.670335210422285, 0.0, 359.5,], [ 0.0, 9.670335210422285, 269.5,], [ 0.0, 0.0, 1.0,],]
distortions = [ 0.003562620248271928, 0.0, 0.0, 0.0, 0.0,]
rotation = [ 0.1284161881272207, 0.003714826710541101, -0.1994563425933652,]
translation = [ -0.2258772873279897, 0.3692173507505997, -0.01727518616371634,]
[metadata]
adjusted = false
error = 1.931100687210916
My filter in the config.toml
file consists of the default values included in the repo:
# Settings for a threshold filter
# Removes data outside threshold (probably errors in tracking), and interpolates
[filter]
enabled = true
medfilt = 13 # length of median filter
offset_threshold = 25 # offset from median filter to count as jump
score_threshold = 0.8 # score below which to count as bad
spline = true # interpolate using cubic spline instead of linear
Why might I be getting the above error?
Thank you!
I'm currently running through the tutorial in a "clean" environment on a computer that successfully runs DeepLabCut (in a different environment) with the GPU. Does the Anipose environment use the GPU by default or does the installation require the DLC GPU installation with Anipose on top?
I am running a project with several sessions to triangulate human faces, and the final 3d videos (and combined videos) are upside down, and also inconsistently rotated between session, although 2d videos have all the same orientation.
Is there any setting in label_videos_3d.py or label_combined.py to set specific markers or even a specific plane in the 3D space to rotate the final 3d videos to a common orientation?
Hi,
whenever I run anipose calibrate I end up with 0 detected checkerboard patterns. I tried different calibration videos and different config.toml settings.
I use a 11x8 checkerboard with a square side length of 25mm. So far I did the following:
set board_size
to [11,8]
or [275, 200]
. I used the latter cause of the documentation saying the units should be consistent.
Anyway, using [11,8] or [275,200] with board_square_side_length = 25
always leads to zero detected checkerboards.
I also tried all above combinations with board_marker_length = 25
, though I think that this code is not necessary when using checkerboards.
My folder structure is as followed:
rect_check--2020-09-16 (DLC model folder)
rect_check (anipose project folder)
| config.toml
| calibration
| --- calib_left.avi
| --- calib_right.avi
| pose-2d
| videos_raw
| --- 011_left.avi
| --- 011_right.avi
| --- 012_left.avi
| --- 012_right.avi ...
and I use nesting = 1
.
I attached the config.toml.
Describe the bug
(anipose) hand-demo-unfilled[0]$ anipose analyze
Traceback (most recent call last):
File "/home/jon/anaconda3/envs/anipose/bin/anipose", line 8, in <module>
sys.exit(cli())
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/anipose/anipose.py", line 135, in analyze
from .pose_videos import pose_videos_all
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/anipose/pose_videos.py", line 11, in <module>
from .common import natural_keys, make_process_fun
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/anipose/common.py", line 10, in <module>
from aniposelib.boards import CharucoBoard, Checkerboard
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/aniposelib/__init__.py", line 6, in <module>
from . import boards, cameras, utils
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/aniposelib/cameras.py", line 428, in <module>
class CameraGroup:
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/aniposelib/cameras.py", line 616, in CameraGroup
@jit(nopython=True, parallel=True, forceobj=True)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/numba/core/decorators.py", line 147, in jit
raise ValueError("Only one of 'nopython' or 'forceobj' can be True.")
ValueError: Only one of 'nopython' or 'forceobj' can be True.
(anipose) hand-demo-unfilled[0]$
Seems Related: https://gitter.im/numba/numba?at=5eafceefb6dd230697a45990
To Reproduce
Steps to reproduce the behavior:
Install via instructions on docs website
Download the hand-demo-unfilled data set
Call anipose analyze
on the hand-demo-unfilled data set
Desktop (please complete the following information):
Hello,
I ran the anipose label-2d
on raw videos that are either .mp4
or .avi
. For both cases, the output labelled video is black, and no images can be seen. What might the issue be?
Thanks!
Hi, I'm trying to setup anipose for tracking, and I run into an issue when using "anipose calibrate" - it can't find the calibration_init.toml file. I could not find an example of such a file in the repository, what is it's exact role?
Thanks
Hi,
when using anipose calibrate I get following error. "detections.pickle" file is created in calibration folder. When I use anipose label-3d
after this it shows message "Labeling videos in 3D..." but nothing happens. Nothing is created and there is no error message.
(dlc-windowsGPUclone) D:\Anipose\Test>anipose calibrate Calibrating... D:\Anipose\Test\Iteration1\calibration\calibration.toml Traceback (most recent call last): File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\ProgramData\Anaconda3\envs\dlc-windowsGPUclone\Scripts\anipose.exe\__main__.py", line 9, in <module> File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\site-packages\click\core.py", line 764, in __call__ return self.main(*args, **kwargs) File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\site-packages\click\core.py", line 717, in main rv = self.invoke(ctx) File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\site-packages\click\core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\site-packages\click\core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\site-packages\click\core.py", line 555, in invoke return callback(*args, **kwargs) File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\site-packages\click\decorators.py", line 64, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\site-packages\click\core.py", line 555, in invoke return callback(*args, **kwargs) File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\site-packages\anipose\anipose.py", line 105, in calibrate calibrate_all(config) File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\site-packages\anipose\common.py", line 165, in fun return process_all(config, process_session, **args) File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\site-packages\anipose\common.py", line 150, in process_all output[past_folders] = process_session(config, path, **args) File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\site-packages\anipose\calibrate.py", line 182, in process_session n_samp_iter=100, n_samp_full=2000) File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\site-packages\calligator\cameras.py", line 1544, in calibrate_rows all_rows[i] = board.estimate_pose_rows(cam, row) File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\site-packages\calligator\boards.py", line 333, in estimate_pose_rows row['ids']) File "c:\programdata\anaconda3\envs\dlc-windowsgpuclone\lib\site-packages\calligator\boards.py", line 611, in estimate_pose_points corners, ids, self.board, K, D) TypeError: Required argument 'rvec' (pos 6) not found
Describe the bug
(anipose) anipose[0]$ anipose calibrate
Calibrating...
/home/jon/data/2020-08_large-3d-maze/2020-08-19_3d-camera-calibration/anipose/dlc-hand
/home/jon/data/2020-08_large-3d-maze/2020-08-19_3d-camera-calibration/anipose/calibration/calibration.toml
/home/jon/data/2020-08_large-3d-maze/2020-08-19_3d-camera-calibration/anipose/calibration/cam-0_2020-08-20T15_56_14.avi
100%|βββββββββββββββββββββββββββββ| 9471/9471 [05:07<00:00, 30.80it/s]
6930 boards detected
/home/jon/data/2020-08_large-3d-maze/2020-08-19_3d-camera-calibration/anipose/calibration/cam-1_2020-08-20T15_56_14.avi
100%|βββββββββββββββββββββββββββββ| 9471/9471 [05:14<00:00, 30.11it/s]
6996 boards detected
/home/jon/data/2020-08_large-3d-maze/2020-08-19_3d-camera-calibration/anipose/calibration/cam-2_2020-08-20T15_56_14.avi
100%|βββββββββββββββββββββββββββββ| 9470/9470 [05:29<00:00, 28.72it/s]
7090 boards detected
/home/jon/data/2020-08_large-3d-maze/2020-08-19_3d-camera-calibration/anipose/calibration/cam-3_2020-08-20T15_56_14.avi
100%|βββββββββββββββββββββββββββββ| 9471/9471 [05:33<00:00, 28.38it/s]
7392 boards detected
/home/jon/data/2020-08_large-3d-maze/2020-08-19_3d-camera-calibration/anipose/calibration/cam-4_2020-08-20T15_56_14.avi
100%|βββββββββββββββββββββββββββββ| 9470/9470 [05:49<00:00, 27.09it/s]
8372 boards detected
defaultdict(<class 'int'>,
{('0', '1'): 5885,
('0', '2'): 5681,
('0', '3'): 6490,
('0', '4'): 6768,
('1', '0'): 5885,
('1', '2'): 6042,
('1', '3'): 6255,
('1', '4'): 6854,
('2', '0'): 5681,
('2', '1'): 6042,
('2', '3'): 6257,
('2', '4'): 6976,
('3', '0'): 6490,
('3', '1'): 6255,
('3', '2'): 6257,
('3', '4'): 7315,
('4', '0'): 6768,
('4', '1'): 6854,
('4', '2'): 6976,
('4', '3'): 7315})
Traceback (most recent call last):
File "/home/jon/anaconda3/envs/anipose/bin/anipose", line 33, in <module>
sys.exit(load_entry_point('anipose', 'console_scripts', 'anipose')())
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/anipose/anipose.py", line 115, in calibrate
calibrate_all(config)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/anipose/common.py", line 168, in fun
return process_all(config, process_session, **args)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/anipose/common.py", line 153, in process_all
output[past_folders] = process_session(config, path, **args)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/anipose/calibrate.py", line 187, in process_session
verbose=True)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/aniposelib/cameras.py", line 1564, in calibrate_rows
error = self.bundle_adjust_iter(imgp, extra, verbose=verbose, **kwargs)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/aniposelib/cameras.py", line 681, in bundle_adjust_iter
error = self.average_error(p2ds, median=True)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/aniposelib/cameras.py", line 1528, in average_error
errors = self.reprojection_error(p3ds, p2ds, mean=True)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/numba/core/dispatcher.py", line 427, in _compile_for_args
error_rewrite(e, 'constant_inference')
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/numba/core/dispatcher.py", line 358, in error_rewrite
reraise(type(e), e, None)
File "/home/jon/anaconda3/envs/anipose/lib/python3.7/site-packages/numba/core/utils.py", line 80, in reraise
raise value.with_traceback(tb)
numba.core.errors.ConstantInferenceError: Failed in nopython mode pipeline (step: nopython rewrites)
Constant inference not possible for: getattr(value=$const92.1, attr=format)
File "../../../../anaconda3/envs/anipose/lib/python3.7/site-packages/aniposelib/cameras.py", line 632:
def reprojection_error(self, p3ds, p2ds, mean=False):
<source elided>
"shapes of 2D and 3D points are not consistent: " \
"2D={}, 3D={}".format(p2ds.shape, p3ds.shape)
^
File "../../../../anaconda3/envs/anipose/lib/python3.7/site-packages/aniposelib/cameras.py", line 632:
def reprojection_error(self, p3ds, p2ds, mean=False):
<source elided>
"shapes of 2D and 3D points are not consistent: " \
"2D={}, 3D={}".format(p2ds.shape, p3ds.shape)
Seems to be another issue with numba (or use of numba), like my last submitted issue.
Desktop (please complete the following information):
Hello!
I have a quick question not regarding the code base, so I apologize if the GitHub issues section is an inappropriate place for me to ask--but I thought a lot of people might find this question relevant, and there seems to be a lot of traction here.
I noticed in your wonderful and detailed preprint that the ChArUco board was manufactured by Applied Image Inc to a very precise level. I was wondering if you guys had any luck with a homemade ChArUco target--e.g. something you might print out and then tape to a little piece of acrylic. Or was purchasing a custom manufactured board necessary?
Back when I was playing around with Anipose (5 months ago now ...) I noticed I was getting pretty good 2D labels from DeepLabCut, but my 3D model looked absolutely horrendous. I suspected it likely had to do with poor triangulation, which might ultimately have been caused by a less than ideal calibration target? My calibration target was relatively janky--I printed it on a sheet of paper and taped it flat to a small piece of acrylic. I then manually waved it about in front of my cameras. My use case is similar, in scale, to yours--the movements of very tiny insects (not flies though).
Do you think such scales necessitate precision-manufactured ChArUco boards?
Thanks!
Hi guys,
I'm just testing out anipose, but on a machine without GPU support (so analysis would take forever). So I decided to try the notebook on Google Colab to make use of their GPU acceleration; I've added a few lines in the top, uninstalling opencv-python and installing aniposelib (and for good measure making sure that the opecv-contrib-python is indeed installed), but would think it possible to continue from there.
But I am for some reason getting an error stating that cv2 cannot be found.
Entire error message here:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-3657c5a7600f> in <module>()
1 import numpy as np
----> 2 from aniposelib.boards import CharucoBoard, Checkerboard
3 from aniposelib.cameras import Camera, CameraGroup
4 from aniposelib.utils import load_pose2d_fnames
3 frames
/usr/lib/python3.6/imp.py in find_module(name, path)
295 break # Break out of outer loop when breaking out of inner loop.
296 else:
--> 297 raise ImportError(_ERR_MSG.format(name), name=name)
298
299 encoding = None
ImportError: No module named 'cv2'
I did also notice that the notebook uses Python3.6, but in the docs the conda environment uses 3.7. I don't know if that's valuable, but might be worth checking up.
Thanks for all your work on making anipose, I look very much forward to trying it out in the wild!
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Hello,
I am using Ubuntu 18.04 and a charuco board to calibrate. I am getting the following error when running anipose calibrate
:
(dlc-anipose) hank-x299@hank-x299:~/src/dlc-utils/examples/beetlepose$ anipose calibrate
Calibrating...
/home/hank-x299/src/dlc-utils/examples/beetlepose/test_1_no_motor
/home/hank-x299/src/dlc-utils/examples/beetlepose/test_1_no_motor/calibration/calibration.toml
/home/hank-x299/src/dlc-utils/examples/beetlepose/test_1_no_motor/calibration/dal_liom_guid_18475996_2020_02_13_20_25_06.mp4
100%|ββββββββββββββββββββββββββ| 30033/30033 [01:46<00:00, 281.65it/s]
15051 boards detected
/home/hank-x299/src/dlc-utils/examples/beetlepose/test_1_no_motor/calibration/dal_liom_guid_18475997_2020_02_13_20_25_08.mp4
100%|ββββββββββββββββββββββββββ| 30033/30033 [00:43<00:00, 694.39it/s]
879 boards detected
/home/hank-x299/src/dlc-utils/examples/beetlepose/test_1_no_motor/calibration/dal_liom_guid_19061101_2020_02_13_20_25_09.mp4
100%|ββββββββββββββββββββββββββ| 30033/30033 [00:58<00:00, 512.92it/s]
3818 boards detected
/home/hank-x299/src/dlc-utils/examples/beetlepose/test_1_no_motor/calibration/dal_liom_guid_19061600_2020_02_13_20_25_10.mp4
100%|ββββββββββββββββββββββββββ| 30033/30033 [00:49<00:00, 604.37it/s]
2022 boards detected
/home/hank-x299/src/dlc-utils/examples/beetlepose/test_1_no_motor/calibration/dal_liom_guid_19061602_2020_02_13_20_25_11.mp4
100%|ββββββββββββββββββββββββββ| 30033/30033 [00:49<00:00, 603.06it/s]
2297 boards detected
defaultdict(<class 'int'>,
{('18475996', '19061101'): 6,
('18475996', '19061600'): 38,
('19061101', '18475996'): 6,
('19061600', '18475996'): 38})
Traceback (most recent call last):
File "/home/hank-x299/anaconda3/envs/dlc-anipose/bin/anipose", line 11, in <module>
load_entry_point('anipose', 'console_scripts', 'anipose')()
File "/home/hank-x299/anaconda3/envs/dlc-anipose/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/hank-x299/anaconda3/envs/dlc-anipose/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/hank-x299/anaconda3/envs/dlc-anipose/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/hank-x299/anaconda3/envs/dlc-anipose/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/hank-x299/anaconda3/envs/dlc-anipose/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/hank-x299/anaconda3/envs/dlc-anipose/lib/python3.6/site-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/hank-x299/anaconda3/envs/dlc-anipose/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/hank-x299/src/anipose/anipose/anipose.py", line 115, in calibrate
calibrate_all(config)
File "/home/hank-x299/src/anipose/anipose/common.py", line 168, in fun
return process_all(config, process_session, **args)
File "/home/hank-x299/src/anipose/anipose/common.py", line 153, in process_all
output[past_folders] = process_session(config, path, **args)
File "/home/hank-x299/src/anipose/anipose/calibrate.py", line 186, in process_session
n_samp_iter=100, n_samp_full=2000)
File "/home/hank-x299/src/calligator/calligator/cameras.py", line 1555, in calibrate_rows
rvecs, tvecs = get_initial_extrinsics(rtvecs)
File "/home/hank-x299/src/calligator/calligator/utils.py", line 173, in get_initial_extrinsics
pairs = find_calibration_pairs(graph, source=0)
File "/home/hank-x299/src/calligator/calligator/utils.py", line 156, in find_calibration_pairs
for new in graph[item]:
TypeError: 'NoneType' object is not subscriptable
My config.toml
file has the following:
[calibration]
# checkerboard / charuco / aruco
board_type = "charuco"
# width and height of grid
board_size = [4, 4]
# number of bits in the markers, if aruco/charuco
board_marker_bits = 4
# number of markers in dictionary, if aruco/charuco
board_marker_dict_number = 50
# length of marker side
# board_marker_length = 0.7 # mm
board_marker_length = 1.4 # mm
# If charuco or checkerboard, square side length
# board_square_side_length = 1.0 # mm
board_square_side_length = 2.0 # mm
[manual_verification]
# true / false
manually_verify = false
Any advice addressing this error is appreciated!
Thanks!
Is your feature request related to a problem? Please describe.
Hi @lambdaloop! Thanks for this great package. We are hoping to have better integration with DLC users to DLC (see here: https://github.com/AlexEMG/DeepLabCut/blob/master/docs/Overviewof3D.md#more-than-2-camera-support)
One issue our users are having is an "easy entry" point. Right now, your docs are for setting up 2D then 3D tracking, but many users have the 2D done, and some images they want to calibrate. I really like the merger of DLC + anipose/calligator, so I want to help/ask to make this more seamless.
My understanding of the workflow for you is it requires users to use your file structure, which is a bit rigid. Would it be possible to make docs such that a user could jump in at this point: https://github.com/lambdaloop/anipose/blob/master/docs/github/start_3d.md#calibration-marker-configuration // https://anipose.readthedocs.io/en/latest/tutorial.html#calibrating-the-cameras
i.e. minimally, now after the 3d set up there is no link to your nice "readthedocs.io" demo (https://anipose.readthedocs.io/en/latest/tutorial.html#calibrating-the-cameras)
i.e. a more optimal solution would be: a simple Jupyter Notebook demo such that the person can navigate to their DLC project folder and then set up a simple config file for your system, then be able to run:
anipose calibrate
anipose triangulate
anipose label-3d
Also, for each of these functions, there is (at least I cannot find) any easy to read docstrings. For example, it is not clear what each function requires. (What file type, format, etc is points?)
triangulate(points, undistort=True, progress=False)
Given an CxNx2 array, this returns an Nx3 array of points, where N is the number of points and C is the number of cameras
Describe the solution you'd like
Ideally, one could come in and use your functions (i.e. inhttps://github.com/lambdaloop/calligator, some below) with a clear entry point. i.e.
import anipose
(or calligator directly?)
the use your functions: https://calligator.readthedocs.io/en/latest/api.html#module-calligator.boards
anipose calibrate
then your triangulation functions:
anipose triangulate
triangulate(points, undistort=True, progress=False)
Given an CxNx2 array, this returns an Nx3 array of points, where N is the number of points and C is the number of cameras
triangulate_possible(points, undistort=True, min_cams=2, progress=False, threshold=0.5)
Given an CxNxPx2 array, this returns an Nx3 array of points by triangulating all possible points and picking the ones with best reprojection error where: C: number of cameras N: number of points P: number of possible options per point
triangulate_ransac(points, undistort=True, min_cams=2, progress=False)
Given an CxNx2 array, this returns an Nx3 array of points, where N is the number of points and C is the number of cameras
reprojection_error
Given an Nx3 array of 3D points and an CxNx2 array of 2D points, where N is the number of points and C is the number of cameras, this returns an CxNx2 array of errors. Optionally mean=True, this averages the errors and returns array of length N of errors
bundle_adjust_iter(p2ds, extra=None, n_iters=10, start_mu=15, end_mu=1, max_nfev=200, ftol=0.0001, n_samp_iter=100, n_samp_full=1000, error_threshold=0.3, verbose=False)
Given an CxNx2 array of 2D points, where N is the number of points and C is the number of cameras, this performs iterative bundle adjustsment to fine-tune the parameters of the cameras. That is, it performs bundle adjustment multiple times, adjusting the weights given to points to reduce the influence of outliers. This is inspired by the algorithm for Fast Global Registration by Zhou, Park, and Koltun
bundle_adjust(p2ds, extra=None, loss='linear', threshold=50, ftol=0.0001, max_nfev=1000, weights=None, start_params=None, verbose=True)
Given an CxNx2 array of 2D points, where N is the number of points and C is the number of cameras, this performs bundle adjustsment to fine-tune the parameters of the cameras
Describe alternatives you've considered
We have considered making DLC n-camera support, but we would rather not :)
Additional context
Right now the documentation is making this hard for us to guide users
Cheers,
DLC hackathon subgroup "3d, yeah!"
How to convert Simi calibration to Anipose or anipose-lib?
This is a continuation of the issue initially posted by @SjoerdBruijn at #15 (comment)
Hello,
I came across a weird problem. When trying to draw calibration board or calibrate cameras I get the following error:
(dlc-windowsgpu) C:\Kalibracja_3D>anipose draw-calibration Drawing calibration board... Traceback (most recent call last): File "c:\programdata\anaconda3\envs\dlc-windowsgpu\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\programdata\anaconda3\envs\dlc-windowsgpu\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\ProgramData\Anaconda3\envs\dlc-windowsgpu\Scripts\anipose.exe\__main__.py", line 7, in <module> File "c:\programdata\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 764, in __call__ return self.main(*args, **kwargs) File "c:\programdata\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 717, in main rv = self.invoke(ctx) File "c:\programdata\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "c:\programdata\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "c:\programdata\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 555, in invoke return callback(*args, **kwargs) File "c:\programdata\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\decorators.py", line 64, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "c:\programdata\anaconda3\envs\dlc-windowsgpu\lib\site-packages\click\core.py", line 555, in invoke return callback(*args, **kwargs) File "c:\programdata\anaconda3\envs\dlc-windowsgpu\lib\site-packages\anipose\anipose.py", line 273, in draw_calibration img = get_calibration_board_image(config) File "c:\programdata\anaconda3\envs\dlc-windowsgpu\lib\site-packages\anipose\common.py", line 224, in get_calibration_board_image board = get_calibration_board(config) File "c:\programdata\anaconda3\envs\dlc-windowsgpu\lib\site-packages\anipose\common.py", line 207, in get_calibration_board manually_verify=manually_verify) TypeError: __init__() got an unexpected keyword argument 'manually_verify'
When this part is added into the config file (either true or false) I get the same error.
[manual_verification] manually_verify = true
It's probably something mundane, but I cannot solve this issue on my own.
Konrad
Hi,
I was wondering if the board needs to be in videos in all of the cameras all the time.
My setup has 4 cameras in 4 corners of a square area. So, it is not possible to have the boards projected on all the cameras for calibration.
I was also wondering if this is leading me to the error below:
D:\workspac_deepcut\local_DLC\FN 10-02-2020 - Short Clip-Chrissy-2020-10-08\videos\anipose_test\test1\calibration\calibrate1_cam2.mp4
99%|ββββββββββββββββββββββββββββ| 3917/3960 [01:30<00:00, 356.40it/s][h264 @ 000002b22675ca80] Invalid NAL unit size (19244 > 789).
[h264 @ 000002b22675ca80] Error splitting the input into NAL units.
99%|βββββββββββββββββββββββββββββ| 3934/3960 [01:30<00:00, 43.41it/s]
562 boards detected
D:\workspac_deepcut\local_DLC\FN 10-02-2020 - Short Clip-Chrissy-2020-10-08\videos\anipose_test\test1\calibration\calibrate1_cam5.mp4
100%|βββββββββββββββββββββββββββββ| 3960/3960 [01:00<00:00, 65.21it/s]
435 boards detected
defaultdict(<class 'int'>, {('2', '5'): 1, ('5', '2'): 1})
Traceback (most recent call last):
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\rahmank\AppData\Local\Continuum\anaconda3\envs\anipose\Scripts\anipose.exe_main.py", line 7, in
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\click\core.py", line 829, in call
return self.main(*args, **kwargs)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\click\decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\anipose\anipose.py", line 115, in calibrate
calibrate_all(config)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\anipose\common.py", line 168, in fun
return process_all(config, process_session, **args)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\anipose\common.py", line 125, in process_all
output[()] = process_session(config, pipeline_prefix, **args)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\anipose\calibrate.py", line 187, in process_session
verbose=True)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\aniposelib\cameras.py", line 1560, in calibrate_rows
rvecs, tvecs = get_initial_extrinsics(rtvecs)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\aniposelib\utils.py", line 173, in get_initial_extrinsics
pairs = find_calibration_pairs(graph, source=0)
File "c:\users\rahmank\appdata\local\continuum\anaconda3\envs\anipose\lib\site-packages\aniposelib\utils.py", line 156, in find_calibration_pairs
for new in graph[item]:
TypeError: 'NoneType' object is not subscriptable
My config toml is given below:
project = 'anipose_test'
model_folder = '../../../'
nesting = 0
video_extension = 'mp4'
[manual_verification]
manually_verify = true
[calibration]
board_type = "charuco"
board_size = [10, 7]
board_marker_bits = 4
board_marker_dict_number = 50
board_marker_length = 18.75 # mm
board_square_side_length = 25 # mm
animal_calibration = false
fisheye = true
[labeling]
scheme = [
]
[triangulation]
triangulate = true
cam_regex = '_cam([0-9])'
cam_align = "1"
ransac = true
optim = true
constraints = [
]
scale_smooth = 25
scale_length = 10
scale_length_weak = 2
reproj_error_threshold = 3
score_threshold = 0.6
n_deriv_smooth = 2
[filter]
enabled = true
medfilt = 9 # length of median filter
offset_threshold = 25 # offset from median filter to count as jump
score_threshold = 0.8 # score below which to count as bad
spline = true # interpolate using cubic spline instead of linear
Thank you for your help.
While I was trying to use anipose for 3D calibration purposes, I came across a couple things in the current documentation that could be changed to prevent confusion for future users.
In start_3d.md
, under the [https://github.com/lambdaloop/anipose/blob/master/docs/start_3d.md#drawing-the-calibration-board(url),
anipose draw_calibration
is actually anipose draw-calibration
Also if we're doing 3D projects, turns out because the minimum number of folders are 2 (calibration and videos-raw), I had to set nesting=2
in the config.toml
file or none of the code even executes.
If the GPU is being used by something else, like a Jupyter Notebook environment which was idling with DeepLabCut, it threw the following error and stopped me from using anipose.
019-10-29 20:57:14.464694: E tensorflow/stream_executor/cuda/cuda_dnn.cc:334] Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED
2019-10-29 20:57:14.467602: E tensorflow/stream_executor/cuda/cuda_dnn.cc:334] Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED
Traceback (most recent call last):
File "c:\programdata\anaconda3\envs\dlc_gpu\lib\site-packages\tensorflow\python\client\session.py", line 1334, in _do_call
return fn(*args)
File "c:\programdata\anaconda3\envs\dlc_gpu\lib\site-packages\tensorflow\python\client\session.py", line 1319, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "c:\programdata\anaconda3\envs\dlc_gpu\lib\site-packages\tensorflow\python\client\session.py", line 1407, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
[[{{node resnet_v1_50/conv1/Conv2D}}]]
[[{{node concat_1}}]]
Thank you for your work!
Hi folks,
this is kind of a follow up of issue #46. After solving the issue of 0 detected calibration patterns / checkerboards, I encountered two more issues:
draw-calibration
ending with an error (see output 1 below)anipose analyze
running for 1-2s before stopping without error and/or output (see output 2 below)Output 1 / draw-calibration
(anipose-conrad) C:\Conrad\AniPose\rect_check--unfilled>anipose draw-calibration
Drawing calibration board...
Traceback (most recent call last):
File "c:\users\bknuser\anaconda3\envs\anipose-conrad\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\bknuser\anaconda3\envs\anipose-conrad\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\bknUser\anaconda3\envs\anipose-conrad\Scripts\anipose.exe\__main__.py", line 7, in <module>
File "c:\users\bknuser\anaconda3\envs\anipose-conrad\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "c:\users\bknuser\anaconda3\envs\anipose-conrad\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "c:\users\bknuser\anaconda3\envs\anipose-conrad\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\bknuser\anaconda3\envs\anipose-conrad\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\bknuser\anaconda3\envs\anipose-conrad\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\users\bknuser\anaconda3\envs\anipose-conrad\lib\site-packages\click\decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "c:\users\bknuser\anaconda3\envs\anipose-conrad\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\users\bknuser\anaconda3\envs\anipose-conrad\lib\site-packages\anipose\anipose.py", line 287, in draw_calibration
cv2.imwrite('calibration.png', img)
cv2.error: OpenCV(3.4.11) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-lw30ardm\opencv\modules\imgcodecs\src\loadsave.cpp:759: error: (-215:Assertion failed) !_img.empty() in function 'cv::imwrite'
Output 2 - anipose analyze
(anipose-conrad) C:\Conrad\AniPose\rect_check--unfilled>anipose analyze
Analyzing videos...
(anipose-conrad) C:\Conrad\AniPose\rect_check--unfilled>
A few infos of my setup:
OS: Win10 Pro, 1903, System Build: 18362.1082
CPU: Core i7-9750H
GPU: RTX 2070 Max-Q
GPU driver: 442.23 DCH
Installed python libraries and versions: see conda list output.txt
conda list output.txt
For an overview of the anipose projects folder and file structure: see tree output anipose dir.txt
tree output anipose dir.txt
For the DLC and anipose config files see config_files.zip
config_files.zip
You'll also find the calibration toml and pickle attached:
calibration.zip
I really want to use anipose for cheap in the field human reach motion tracking but don't really know what else to do. Any hint as to where the problem could originate is much appreciated.
Cheers,
Conrad
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Actually, I'm struggling to motion tracking using Anipose toolbox.
Even though I completed all steps, results are not good. so, I'm trying to change the parameters.
below the picture is the what i want to change the parameters.
I read the document in anipose's docs page(https://anipose.readthedocs.io/en/latest/params.html). but I don't understand what they mean.
and even I can understand, I'm likely to find the optimal parameter.
so, I'm trying to combine with gird search and cross validation in Anipose toolbox.
please give me some advice for me. thank you!
When installing on Ubuntu 18.04, if opencv-python is already installed then when opencv-contrib-python is installed, aruco and the rest of the development open-cv modules are not installed due to the package conflict. This could be documented in the installation possibly.
Describe the bug
When I run anipose analyze
I get: ImportError: cannot import name 'aruco'
Installing opencv-python~=3.4 and opencv-contrib-python~=3.4doesn't do anything because it's already installed. Uninstalling and reinstalling does not work either.
To Reproduce
Steps to reproduce the behavior:
anipose analyze
Expected behavior
It's expected to analyze the videos based on the config.toml file.
Desktop (please complete the following information):
Additional context
Full traceback:
anipose analyze
Traceback (most recent call last):
File "/home/ml/anaconda3/envs/anipose/bin/anipose", line 8, in <module>
sys.exit(cli())
File "/home/ml/.local/lib/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/ml/.local/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/ml/.local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ml/.local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ml/.local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/ml/.local/lib/python3.6/site-packages/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/ml/.local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/ml/anaconda3/envs/anipose/lib/python3.6/site-packages/anipose/anipose.py", line 135, in analyze
from .pose_videos import pose_videos_all
File "/home/ml/anaconda3/envs/anipose/lib/python3.6/site-packages/anipose/pose_videos.py", line 11, in <module>
from .common import natural_keys, make_process_fun
File "/home/ml/anaconda3/envs/anipose/lib/python3.6/site-packages/anipose/common.py", line 10, in <module>
from aniposelib.boards import CharucoBoard, Checkerboard
File "/home/ml/anaconda3/envs/anipose/lib/python3.6/site-packages/aniposelib/__init__.py", line 6, in <module>
from . import boards, cameras, utils
File "/home/ml/anaconda3/envs/anipose/lib/python3.6/site-packages/aniposelib/boards.py", line 2, in <module>
from cv2 import aruco
ImportError: cannot import name 'aruco'
Describe the bug
When trying 'anipose calibrate' on my movies I get the error message 'input matrix must be 1x3, 3x1 or 3x3 in function cvRodigrues2'.
I use three calibration movies cropped from one camera view. Two views are cropped and flipped since they're via mirrors, the center is only cropped.
I have the feeling this is an opencv version issue, but I'm really not sure.
Another issue is the low number of detected boards. I will take new movies with more boards, but I hope to first solve this issue. (Except of course when this is potentially an issue of low number of boars)
Error:
(DLC-GPU) D:\DLC\Trial_Loes_mirrors>anipose calibrate
Calibrating...
D:\DLC\Trial_Loes_mirrors\experiment 200526
D:\DLC\Trial_Loes_mirrors\experiment 200526\calibration\calibration.toml
defaultdict(<class 'int'>,
{('A', 'B'): 54,
('B', 'A'): 54,
('B', 'C'): 73,
('C', 'B'): 73})
c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\numpy\core\fromnumeric.py:3118: RuntimeWarning: Mean of empty slice.
out=out, **kwargs)
c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\numpy\core\_methods.py:85: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
Traceback (most recent call last):
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\ProgramData\Anaconda3\envs\DLC-GPU\Scripts\anipose.exe\__main__.py",
line 7, in <module>
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\click\core.py",
line 829, in __call__
return self.main(*args, **kwargs)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\click\core.py",
line 782, in main
rv = self.invoke(ctx)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\click\core.py",
line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\click\core.py",
line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\click\core.py",
line 610, in invoke
return callback(*args, **kwargs)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\click\decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\click\core.py",
line 610, in invoke
return callback(*args, **kwargs)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\anipose\anipose.py", line 115, in calibrate
calibrate_all(config)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\anipose\common.py", line 168, in fun
return process_all(config, process_session, **args)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\anipose\common.py", line 153, in process_all
output[past_folders] = process_session(config, path, **args)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\anipose\calibrate.py", line 187, in process_session
verbose=True)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\aniposelib\cameras.py", line 1560, in calibrate_rows
rvecs, tvecs = get_initial_extrinsics(rtvecs)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\aniposelib\utils.py", line 174, in get_initial_extrinsics
extrinsics = compute_camera_matrices(rtvecs, pairs)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\aniposelib\utils.py", line 167, in compute_camera_matrices
ext = get_transform(rtvecs, b, a)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\aniposelib\utils.py", line 78, in get_transform
M_mean = mean_transform_robust(L, M_mean, error=0.1)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\aniposelib\utils.py", line 60, in mean_transform_robust
return mean_transform(M_list_robust)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\aniposelib\utils.py", line 48, in mean_transform
return make_M(rvec, tvec)
File "c:\programdata\anaconda3\envs\dlc-gpu\lib\site-packages\aniposelib\utils.py", line 11, in make_M
rotmat, _ = cv2.Rodrigues(rvec)
cv2.error: OpenCV(3.4.9) C:\projects\opencv-python\opencv\modules\calib3d\src\calibration.cpp:292: error: (-201:Incorrect size of input array) Input matrix must
be 1x3, 3x1 or 3x3 in function 'cvRodrigues2'
Desktop (please complete the following information):
OS: Win7 (SP1) 64bits
ipython 7.13.0
conda 4.8.2
opencv 3.4.9
anipose 0.8.1
Xeon W2123
32 GB
RTX2080Ti
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.