lukas-blecher / lukas-blecher/AutoMask

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

Open
#7 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
178
Forks
21
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/lukas-blecher/AutoMask/files/5394477/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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached log.txt and inspect mask_spline.py at line 158, along with the load_helper.py messages and trackers/SiamMask/model.pth loading. Reproduce tracking with the reported image and parameters to identify when the NoneType error and zero-point approximation occur. Done means the failure is handled visibly in Blender and the relevant error is explained or resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
desktop, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.