Traceback (most recent call last):
File "./scripts/DUTStabilizer.py", line 111, in
generateStable(model, inPath, outPath, outPrefix, maxlength, args)
File "./scripts/DUTStabilizer.py", line 57, in generateStable
origin_motion, smoothPath = model.inference(x.cuda(), xRGB.cuda(), repeat=args.Repeat)
File "/home/gary/vs/deeplearn/DUTCode/models/DUT/DUT.py", line 273, in inference
for i in range(len(kpts) - 1)]
File "/home/gary/vs/deeplearn/DUTCode/models/DUT/DUT.py", line 273, in
for i in range(len(kpts) - 1)]
File "/home/gary/vs/deeplearn/DUTCode/models/DUT/MotionPro.py", line 105, in inference
motion, gridsMotion, = self.homoEstimate(concat_motion, kp)
File "/home/gary/vs/deeplearn/DUTCode/utils/ProjectionUtils.py", line 170, in multiHomoEstimate
pred_Y = KMeans(n_clusters=2, random_state=2).fit_predict(motion_numpy)
File "/home/gary/anaconda3/envs/DUTCode/lib/python3.6/site-packages/sklearn/cluster/_kmeans.py", line 1122, in fit_predict
return self.fit(X, sample_weight=sampleweight).labels
File "/home/gary/anaconda3/envs/DUTCode/lib/python3.6/site-packages/sklearn/cluster/_kmeans.py", line 1033, in fit
accept_large_sparse=False)
File "/home/gary/anaconda3/envs/DUTCode/lib/python3.6/site-packages/sklearn/base.py", line 420, in _validate_data
X = check_array(X, check_params)
File "/home/gary/anaconda3/envs/DUTCode/lib/python3.6/site-packages/sklearn/utils/validation.py", line 72, in inner_f
return f(kwargs)
File "/home/gary/anaconda3/envs/DUTCode/lib/python3.6/site-packages/sklearn/utils/validation.py", line 645, in check_array
allow_nan=force_all_finite == 'allow-nan')
File "/home/gary/anaconda3/envs/DUTCode/lib/python3.6/site-packages/sklearn/utils/validation.py", line 99, in _assert_all_finite
msg_dtype if msg_dtype is not None else X.dtype)
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').
Traceback (most recent call last): File "./scripts/DUTStabilizer.py", line 111, in
generateStable(model, inPath, outPath, outPrefix, maxlength, args)
File "./scripts/DUTStabilizer.py", line 57, in generateStable
origin_motion, smoothPath = model.inference(x.cuda(), xRGB.cuda(), repeat=args.Repeat)
File "/home/gary/vs/deeplearn/DUTCode/models/DUT/DUT.py", line 273, in inference
for i in range(len(kpts) - 1)]
File "/home/gary/vs/deeplearn/DUTCode/models/DUT/DUT.py", line 273, in
for i in range(len(kpts) - 1)]
File "/home/gary/vs/deeplearn/DUTCode/models/DUT/MotionPro.py", line 105, in inference
motion, gridsMotion, = self.homoEstimate(concat_motion, kp)
File "/home/gary/vs/deeplearn/DUTCode/utils/ProjectionUtils.py", line 170, in multiHomoEstimate
pred_Y = KMeans(n_clusters=2, random_state=2).fit_predict(motion_numpy)
File "/home/gary/anaconda3/envs/DUTCode/lib/python3.6/site-packages/sklearn/cluster/_kmeans.py", line 1122, in fit_predict
return self.fit(X, sample_weight=sampleweight).labels
File "/home/gary/anaconda3/envs/DUTCode/lib/python3.6/site-packages/sklearn/cluster/_kmeans.py", line 1033, in fit
accept_large_sparse=False)
File "/home/gary/anaconda3/envs/DUTCode/lib/python3.6/site-packages/sklearn/base.py", line 420, in _validate_data
X = check_array(X, check_params)
File "/home/gary/anaconda3/envs/DUTCode/lib/python3.6/site-packages/sklearn/utils/validation.py", line 72, in inner_f
return f(kwargs)
File "/home/gary/anaconda3/envs/DUTCode/lib/python3.6/site-packages/sklearn/utils/validation.py", line 645, in check_array
allow_nan=force_all_finite == 'allow-nan')
File "/home/gary/anaconda3/envs/DUTCode/lib/python3.6/site-packages/sklearn/utils/validation.py", line 99, in _assert_all_finite
msg_dtype if msg_dtype is not None else X.dtype)
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').
I use default dataset in folder images, thanks~