facebookresearch / pifuhd

High-Resolution 3D Human Digitization from A Single Image.
Other
9.5k stars 1.44k forks source link

IndexError: index 18 is out of bounds for axis 0 with size 18 #69

Closed EthanZoneCoding closed 3 years ago

EthanZoneCoding commented 3 years ago

I think this has something to do with my keypoints.

python -m apps.simple_test --input_path E:\pifuhd-master\images -r 50 Resuming from ./checkpoints/pifuhd.pt Warning: opt is overwritten. test data size: 1 initialize network with normal initialize network with normal generate mesh (test) ... 0%| | 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "C:\Users\Ethan\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\Ethan\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "E:\pifuhd-master\apps\simple_test.py", line 30, in <module> reconWrapper(cmd, args.use_rect) File "E:\pifuhd-master\apps\recon.py", line 220, in reconWrapper recon(opt, use_rect) File "E:\pifuhd-master\apps\recon.py", line 205, in recon test_data = test_dataset[i] File "E:\pifuhd-master\lib\data\EvalWPoseDataset.py", line 282, in __getitem__ return self.get_item(index) File "E:\pifuhd-master\lib\data\EvalWPoseDataset.py", line 223, in get_item cnt = sum(flags[check_id]) IndexError: index 18 is out of bounds for axis 0 with size 18

Here are my keypoints: {"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[1124.18,462.955,0.936321,1187.5,934.151,0.859984,906.685,978.95,0.89286,834.449,1414.81,0.918612,761.492,1839.93,0.923157,1459.47,906.551,0.824061,1641.26,1341.6,0.901718,1903.56,1722.35,0.815697,1115.05,1840.17,0.654339,1124.42,2601.55,0.660059,1323.62,3308.54,0.18779,1487.02,1767.75,0.621187,1613.75,2601.67,0.687337,1713.43,3308.61,0.2847,1051.64,408.535,0.925232,1187.93,399.271,0.989534,970.455,499.116,0.889954,1269.81,471.83,0.949659],"face_keypoints_2d":[975.541,463.559,0.835569,982.649,497.323,0.807407,989.757,534.641,0.8055,996.865,564.85,0.855784,1009.3,596.837,0.829584,1027.07,630.601,0.760076,1053.73,650.148,0.809103,1092.83,664.364,0.811594,1135.47,664.364,0.784535,1179.9,660.81,0.779876,1210.11,637.709,0.818724,1236.77,611.053,0.777803,1250.98,579.067,0.906839,1256.31,547.08,0.794327,1263.42,507.985,0.857674,1265.2,475.998,0.899647,1265.2,436.904,0.924126,987.98,408.471,0.824991,1003.97,387.147,0.81357,1025.3,378.261,0.909798,1053.73,372.93,0.880409,1080.39,378.261,0.913792,1144.36,369.376,0.770441,1167.46,362.268,0.889626,1195.89,360.491,0.875465,1222.55,365.822,0.926948,1240.32,385.37,0.830894,1110.6,404.917,0.850669,1114.15,420.91,0.88768,1115.93,435.127,0.887659,1119.48,451.12,0.815714,1094.6,495.546,0.8605,1108.82,495.546,0.869497,1123.03,497.323,0.868601,1137.25,493.769,0.909277,1151.47,493.769,0.927127,1025.3,429.796,0.875235,1039.51,420.91,0.94105,1053.73,419.133,0.917726,1071.5,422.687,0.826786,1055.51,428.018,0.86385,1039.51,433.35,0.932887,1155.02,420.91,0.856235,1174.57,408.471,0.896242,1194.12,408.471,0.96523,1208.33,417.356,0.932746,1194.12,420.91,0.981717,1174.57,422.687,0.877414,1078.61,561.296,0.845855,1092.83,536.418,0.891624,1108.82,523.978,0.90859,1123.03,527.533,0.897593,1137.25,522.201,0.9298,1153.24,534.641,0.945055,1174.57,550.634,0.890404,1155.02,561.296,0.89827,1139.03,564.85,0.971835,1124.81,566.627,0.951182,1110.6,566.627,0.936393,1094.6,564.85,0.932043,1085.72,554.188,0.845733,1108.82,547.08,0.909487,1123.03,547.08,0.913482,1137.25,541.749,0.866299,1165.68,548.857,0.939389,1137.25,543.526,0.86149,1123.03,547.08,0.939958,1108.82,547.08,0.920088,1050.18,422.687,0.942085,1181.68,412.025,0.868692],"hand_left_keypoints_2d":[1909.08,1759.42,0.661345,1894,1823.5,0.846076,1903.42,1900.77,0.827875,1922.27,1976.15,0.890933,1935.46,2028.92,0.749202,1997.65,1921.5,0.599916,2012.73,2002.53,0.74456,1999.54,2049.65,0.956842,1978.81,2081.69,0.893423,2012.73,1919.61,0.814147,2014.61,2004.42,0.947145,1990.11,2049.65,0.809946,1954.31,2081.69,0.783649,2012.73,1913.96,0.737787,2012.73,1987.46,0.889686,1976.92,2034.57,0.877729,1941.11,2066.61,0.858575,1999.54,1902.65,0.724411,1995.77,1974.27,0.644772,1971.27,2004.42,0.746116,1939.23,2034.57,0.666483],"hand_right_keypoints_2d":[751.482,1846.6,0.673794,784.887,1895.83,0.827118,800.71,1971.43,0.869246,800.71,2043.51,0.874217,800.71,2103.29,0.853065,718.076,2013.62,0.785918,730.384,2101.53,0.87267,765.547,2150.76,0.789976,800.71,2177.13,0.87287,700.495,2017.14,0.853781,728.625,2108.56,0.780918,784.887,2150.76,0.521937,839.39,2159.55,0.742811,702.253,2013.62,0.678473,728.625,2092.74,0.632388,779.612,2131.42,0.731197,834.115,2145.49,0.72069,714.56,2001.32,0.633473,737.416,2080.43,0.493232,770.821,2103.29,0.524306,800.71,2112.08,0.517933],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}

Sorry if the formatting is bad, I don't do issues much.

shunsukesaito commented 3 years ago

Yes, seems like the number of keypoints is not compatible with the current code. Have you figured it out? You could also try the cropping code in the google colab demo.