hector-sab / DIM_DataCreation

Data creation for training Deep Image Matting. Model at https://github.com/Joker316701882/Deep-Image-Matting
34 stars 10 forks source link

folders is not defined #1

Closed red010182 closed 7 years ago

red010182 commented 7 years ago

main.py

from DataCreation2 import DataCreation

# Folder where the surreal data is located
SUR_DATA_DIR = './data/cmu/train/run0/01_01'

# Output Directory
OUT_DIR = './data/Deep-Image-Matting/data/'

# Backgrounds 
BG_DIR = './data/Deep-Image-Matting/backgrounds/'

for folder in folders:
  print('folder '+folder)
  create = DataCreation(ipath=SUR_DATA_DIR, opath=OUT_DIR, bg_path=BG_DIR)
  create.create_data()

python main.py results:

Traceback (most recent call last):
  File "main.py", line 12, in <module>
    for folder in folders:
NameError: name 'folders' is not defined
hector-sab commented 7 years ago

Don´t use the for loop. For a signle folder of the SURREAL data use

from DataCreation2 import DataCreation

# Folder where the surreal data is located
SUR_DATA_DIR = './data/cmu/train/run0/01_01'

# Output Directory
OUT_DIR = './data/Deep-Image-Matting/data/'

# Backgrounds 
BG_DIR = './data/Deep-Image-Matting/backgrounds/'

create = DataCreation(ipath=SUR_DATA_DIR, opath=OUT_DIR, bg_path=BG_DIR)
create.create_data()
red010182 commented 7 years ago

Thank you for reply. Hope you can also update the readme.md, or should I pull a request for you?