Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python shows type error when tracking: "'NoneType' object is not subscriptable" #7

Open
jin-eld opened this issue Oct 16, 2020 · 3 comments

Comments

@jin-eld
Copy link

jin-eld commented Oct 16, 2020

Hi,

I finally managed to get the dependencies installed in a way that they'd work and was now able to try out your add-on - very promising stuff!

Unfortunately I still did run into a few issues. What I ran into is a python traceback (attached) with an error "TypeError: 'NoneType' object is not subscriptable"

log.txt

I can't yet say how it happens, I guess it's a combination of parameters and the image being traced that causes it.

And one question - could you please explain this message:
[2020-10-16 23:49:53,271-rk0-load_helper.py# 31] load pretrained model from /home/xxx/AutoMask/trackers/SiamMask/model.pth
[2020-10-16 23:49:53,336-rk0-load_helper.py# 25] remove prefix 'module.'
[2020-10-16 23:49:53,340-rk0-load_helper.py# 18] used keys:356
[2020-10-16 23:49:54,673-rk0-mask_spline.py#158] No approximation to the mask could be found. Try again with other parameters. 0 points were given instead of 1921

I understand I am supposed to try with "other parameters" but maybe you could hint on what influences what in regard to this error message. Btw this error does not show up in blender, so you click the button and nothing happens, would be good to notify the user that things did not work out.

I was trying to trace as precisely as possible and I did read the docs on each parameter, but somehow I am still not sure about what I am doing :)

Is it possible to use training data from DensePose to improve tracking? Their tracked videos seemed to be very precise, I assume you are familiar with that project: https://github.com/facebookresearch/detectron2/tree/master/projects/DensePose

Is there anything we (the users) could do, to help you to improve the plugin, especially in a way to get closer to the precision on the DensePose videos?

Kind regards,
Jin

@lukas-blecher
Copy link
Owner

Hi,
sorry for the late reply. I've got university stuff going on right now, so I won't be able to improve the addon much further atm.

The "TypeError: 'NoneType' object is not subscriptable" Error should not happen. Did it happen at the end of the video by any chance?

Regarding the No approximation to the mask could be found. Try again with other parameters. 0 points were given instead of 1921 error: I've written a quite primitive tracer to transform the bitmask to spline masks, as used in blender. I guess there's something wrong there too? I'm not very familiar with the code anymore, so that will stay like that unless somebody wants to take it on

The DensePose project is indeed very promising, however it only tracks humans and my goal with this addon was to track any mask.

Is there anything we (the users) could do, to help you to improve the plugin, especially in a way to get closer to the precision on the DensePose videos?

Sure, I'm happy about any help. PR's welcome

@jin-eld
Copy link
Author

jin-eld commented Oct 22, 2020

The "TypeError: 'NoneType' object is not subscriptable" Error should not happen. Did it happen at the end of the video by any chance?

Hmm, I don't think so, I can try to isolate the error and provide a sequence where it gets triggered if you had time to look at it, but it sounds like you'll be quite busy?

Regarding the No approximation to the mask could be found. Try again with other parameters. 0 points were given instead of 1921 error: I've written a quite primitive tracer to transform the bitmask to spline masks, as used in blender. I guess there's something wrong there too? I'm not very familiar with the code anymore, so that will stay like that unless somebody wants to take it on

The DensePose project is indeed very promising, however it only tracks humans and my goal with this addon was to track any mask.

True, but then again - humans are very difficult to trace, if we were able to do that reliably that'd be really awesome! That being said - I could not even get the DensePose stuff to install. It uses some outdated libs and python versioning and python dependencies - that's a huge mess....

Hi,
sorry for the late reply. I've got university stuff going on right now, so I won't be able to improve the addon much further atm.

The "TypeError: 'NoneType' object is not subscriptable" Error should not happen. Did it happen at the end of the video by any chance?

Regarding the No approximation to the mask could be found. Try again with other parameters. 0 points were given instead of 1921 error: I've written a quite primitive tracer to transform the bitmask to spline masks, as used in blender. I guess there's something wrong there too? I'm not very familiar with the code anymore, so that will stay like that unless somebody wants to take it on

The DensePose project is indeed very promising, however it only tracks humans and my goal with this addon was to track any mask.

Is there anything we (the users) could do, to help you to improve the plugin, especially in a way to get closer to the precision on the DensePose videos?

Sure, I'm happy about any help. PR's welcome

Thing is that while I am good with C and know some python, I totally suck at math, so I never dared to even look at things that involve calculations or stuff like that... I assume such knowledge will be needed if I wanted to work on the plugin?

@lukas-blecher
Copy link
Owner

There is not much plain math going on in the code I wrote iirc. The only thing you should be afraid of are bad practices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants