USDSeg-FCOS
USDSeg-FCOS copied to clipboard
shape dictionary
Hi! Sorry to bother you. Does the code of Shape Dictionary include in the git? I mean the generation of shape dictionary,I don't find it in your code. If you could offer the part of code,I would appreciate it!
Hi,
To generate the dictionary, you can follow the following code snippet.
Note that images should be of shape (N, M), where $N$ is the number of samples, and $M$ is the resolution of each mask, e.g., $64*64=4096$
from sklearn.decomposition import DictionaryLearning
dico = DictionaryLearning(n_components=n_components, n_jobs=-1, max_iter=n_iter, verbose=True)
dico.fit(images)