Notice
Recent Posts
Recent Comments
Link
- Today
- Total
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- 영상처리
- Windows
- Xavier
- Tistory
- agx
- 텐서플로우
- 설치
- Jetson
- 블로그
- Nvidia
- cuda
- 티스토리
- tensorflow
- 파이썬
- DNN
- tx2
- openCV
- 애드센스
- Linux
- ubuntu
- Darknet
- GPU
- 라즈베리파이
- 딥러닝
- 엔비디아
- YOLO
- 물체검출
- openpose
- 방법
- python
Archives
엔지니어스 - Engineeus
TypeError: tuple indices must be integers or slices, not tuple 본문
Autonomous Tech./Error (Windows & Ubuntu)
TypeError: tuple indices must be integers or slices, not tuple
Engineeus 2021. 8. 23. 09:09728x90
<error>
TypeError: tuple indices must be integers or slices, not tuple
<problum is>
sklearn.utils.linear_assignment_ was replaced with scipy.optimize.linear_sum_assignment since the latter was pruned in the current version. I found the above function in a previous commit.
<solution>
Follows these steps to fix the bug.
- Comment out the import
# from scipy.optimize import linear_sum_assignment as linear_assignment
- Use pip to install lap
- Copy and paste the belmow function in the sort.py file
def linear_assignment(cost_matrix):
try:
import lap
_, x, y = lap.lapjv(cost_matrix, extend_cost=True)
return np.array([[y[i], i] for i in x if i >= 0])
except ImportError:
from scipy.optimize import linear_sum_assignment
x, y = linear_sum_assignment(cost_matrix)
return np.array(list(zip(x, y)))
'Autonomous Tech. > Error (Windows & Ubuntu)' 카테고리의 다른 글
Comments