Comments (12)
$ python run.py
Traceback (most recent call last):
File "run.py", line 79, in
tracker.init([ix, iy, w, h], frame) # TODO tracker.init
File "/home/hp/zjc/nk_PyCharm/PyCharm_project/nk_DeepSortYolo/deep_sort_yolov3-master/3_uoip-KCFpy
/KCFpy/kcftracker.py", line 283, in init
self._tmpl = self.getFeatures(image, 1)
File "/home/hp/zjc/nk_PyCharm/PyCharm_project/nk_DeepSortYolo/deep_sort_yolov3-master/3_uoip-KCFpy
/KCFpy/kcftracker.py", line 194, in getFeatures
cx = self._roi[0] + self._roi[2]/2 # float # TODO 此处报错
TypeError: 'map' object is not subscriptable
from kcfpy.
$ python run.py
Traceback (most recent call last):
File "run.py", line 79, in
tracker.init([ix, iy, w, h], frame) # TODO tracker.init
File "/home/hp/zjc/nk_PyCharm/PyCharm_project/nk_DeepSortYolo/deep_sort_yolov3-master/3_uoip-KCFpy
/KCFpy/kcftracker.py", line 283, in init
self._tmpl = self.getFeatures(image, 1)
File "/home/hp/zjc/nk_PyCharm/PyCharm_project/nk_DeepSortYolo/deep_sort_yolov3-master/3_uoip-KCFpy
/KCFpy/kcftracker.py", line 194, in getFeatures
cx = self._roi[0] + self._roi[2]/2 # float # TODO 此处报错
TypeError: 'map' object is not subscriptable
map() returns a list in python2, but in python3, it returns a map object.
So you can wrap map() with list() e.g.
list(map(float, roi))
And i guess you'll meet other errors with python3 like: '/' may return a int in python2 if two numbers are both int, but always return float in python3.
After solving all these errors with python3, I can run this code, but sometimes I crop a region, it will crash, like this:
Do you know anything about this?
from kcfpy.
Thanks i already use list map.your advice is good .i meet many problem .now i can run . I am in china . It is to late .tomorrow i will see the problem you put deeper
from kcfpy.
when you crop a region. It.must be even pixel .if it's odd pixel,will meet this problem. raw an col both need even .i solve the problem by turning odd to even. I hope it can help you .if you have other better method please share it with me
from kcfpy.
Thanks! It won't crash now
from kcfpy.
Do you. Use the method i provide to. Solve your problem ? i think there is other better way to solve it
from kcfpy.
你好,我想问一下添加list 之后是否出现
Traceback (most recent call last):
File "/home/rao/KCFpy/run.py", line 75, in
tracker.init([ix,iy,w,h], frame)
File "/home/rao/KCFpy/kcftracker.py", line 271, in init
self._tmpl = self.getFeatures(image, 1)
File "/home/rao/KCFpy/kcftracker.py", line 220, in getFeatures
z = cv2.resize(z, tuple(self._tmpl_sz))
TypeError: integer argument expected, got float
这种问题
from kcfpy.
ink there is other better way to solve it
你好,我也遇到了这个问题,请问你具体是怎么改的呢?even pixel怎么确定,还有就是,我怎么能暂停视频,画好我要追踪的目标,然后再追踪呢,视频里的目标移动太快了,我来不及画框。
from kcfpy.
你好,我想问一下添加list 之后是否出现
Traceback (most recent call last):
File "/home/rao/KCFpy/run.py", line 75, in
tracker.init([ix,iy,w,h], frame)
File "/home/rao/KCFpy/kcftracker.py", line 271, in init
self._tmpl = self.getFeatures(image, 1)
File "/home/rao/KCFpy/kcftracker.py", line 220, in getFeatures
z = cv2.resize(z, tuple(self._tmpl_sz))
TypeError: integer argument expected, got float
这种问题
是,我把float转为int后还会报新的错误
from kcfpy.
然后,你们怎么解决的呢
from kcfpy.
然后,你们怎么解决的呢
change all the '/' into '//' in these codes
from kcfpy.
in line #267
self._roi = list(map(float, roi)) # add list by hua
from kcfpy.
Related Issues (19)
- Faster version (Dual Correlation Filter - DCF) HOT 3
- I have question about the KCFcpp-py-wrapper ,how can I find the target wether lost? HOT 3
- how to pulse the video so i can choose the perfect object i want to track? HOT 1
- How to deal with the situation of target lost
- multi-target tracking HOT 1
- why is it not useful when i run the code
- It is not tracking anything, it is just front camera is opened HOT 1
- I believe there are some bugs in the code HOT 1
- AssertionError
- slice indices must be integers
- for those who need python3 version
- The gap between KCFcpp and KCFpy? HOT 2
- If we set 'hog=False', Tracking is very unstable
- What will change it will do to my systerm if I install KCFcpp-py-wrapper ?
- Some Question related to program logic
- A bug about @jit decorator in numba. HOT 1
- TypeError: 'map' object is not subscriptable HOT 1
- I think the code has some question in ' def getFeature()' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kcfpy.