-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildModels.py
14 lines (14 loc) · 893 Bytes
/
buildModels.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import os
import sys
import importlib
robustVideoMateConverter = os.path.join(os.path.dirname(__file__), "RobustVideoMatting", "RVM_convert.py")
segment_anythingCoverter = os.path.join(os.path.dirname(__file__), "segment-anything", "sam_convert.py")
segmentationRefinementConverter = os.path.join(os.path.dirname(__file__), "segmentation_refinement", "Refiner_convert.py")
MODNetConverter = os.path.join(os.path.dirname(__file__), "ModNet", "ModNet_convert.py")
SGHM_converter = os.path.join(os.path.dirname(__file__), "SemanticGuidedHumanMatting", "SGHM_convert.py")
for covneter in [robustVideoMateConverter, segment_anythingCoverter, segmentationRefinementConverter,
MODNetConverter, SGHM_converter]:
sys.path.append(os.path.dirname(covneter))
mod = importlib.import_module(os.path.basename(covneter).replace(".py", ""))
met = getattr(mod, "convert")
met()