Daniel Gil-U Fuhge commited on
Commit
5235398
·
1 Parent(s): fd46ad4

update deepsvg model

Browse files
animationPipeline.py CHANGED
@@ -29,7 +29,7 @@ def animateLogo(path : str):
29
 
30
  model.load_state_dict(torch.load("models/animation_transformer.pth", map_location=torch.device('cpu')), strict=False)
31
 
32
- df = compute_embedding(path, "src/preprocessing/deepsvg/deepsvg_models/deepSVG_hierarchical_ordered.pth.tar")
33
  df = df.drop("animation_id", axis=1)
34
 
35
  df = pd.concat([df, pd.DataFrame(0, index=df.index, columns=range(df.shape[1], df.shape[1] + 26))], axis=1, ignore_index=True).astype(float)
 
29
 
30
  model.load_state_dict(torch.load("models/animation_transformer.pth", map_location=torch.device('cpu')), strict=False)
31
 
32
+ df = compute_embedding(path, "models/deepSVG_hierarchical_ordered.pth.tar")
33
  df = df.drop("animation_id", axis=1)
34
 
35
  df = pd.concat([df, pd.DataFrame(0, index=df.index, columns=range(df.shape[1], df.shape[1] + 26))], axis=1, ignore_index=True).astype(float)
models/deepSVG_hierarchical_ordered.pth.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b44e93095426b18ef2dfaf5ebbced8b7d29dcd6ce79325681d976acb1366a22
3
+ size 41280531
src/preprocessing/preprocessing.py CHANGED
@@ -4,7 +4,6 @@ import copy
4
  import torch
5
  import glob
6
  import pandas as pd
7
- import streamlit as st
8
  import pickle
9
  from xml.dom import minidom
10
  from svgpathtools import svg2paths2
@@ -61,7 +60,6 @@ def compute_embedding(path: str, model_path: str, save: str = None) -> pd.DataFr
61
  decomposed_svgs = {}
62
 
63
  for i in range(len(paths)):
64
- st.write(document)
65
  doc_temp = copy.deepcopy(document)
66
  paths_temp = doc_temp.getElementsByTagName('path')
67
  current_path = paths_temp[i]
 
4
  import torch
5
  import glob
6
  import pandas as pd
 
7
  import pickle
8
  from xml.dom import minidom
9
  from svgpathtools import svg2paths2
 
60
  decomposed_svgs = {}
61
 
62
  for i in range(len(paths)):
 
63
  doc_temp = copy.deepcopy(document)
64
  paths_temp = doc_temp.getElementsByTagName('path')
65
  current_path = paths_temp[i]