Skip to content

Commit

Permalink
try with a new path value (#69)
Browse files Browse the repository at this point in the history
* try with new path value

* aclconfigpath failed, only try with new model path

* aclconfigpath failed, only try with new model path

* try with new model path

* improve the format
  • Loading branch information
Emma-An94 authored May 26, 2021
1 parent e017588 commit 37b7882
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions colorization/src/colorize_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def InitResource(self):
on success this function returns 0
on failure this function returns 1
"""
# ACLCONFIGPATH = os.path.join(os.path.abspath(os.path.dirname(__file__)),
# '../acl.json')
# ret = acl.init(ACLCONFIGPATH)
ret = acl.init() # no configuration.info as argument
if ret != acl_constants.ACL_ERROR_NONE:
print("Acl init failed")
Expand Down
4 changes: 3 additions & 1 deletion colorization/src/pipeline.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from colorize_process import ColorizeProcess
# from utils import CopyDataDeviceToHost
import numpy
import os
# import cv2
# from Data.data import *
# import splitVideo
Expand Down Expand Up @@ -51,7 +52,8 @@ def colorize_image(image_path_input, image_path_output):

kModelWidth = numpy.uint32(224)
kModelHeight = numpy.uint32(224)
KMODELPATH = "../model/colorization.om"
KMODELPATH = os.path.join(os.path.abspath(os.path.dirname(__file__)),
"../../model/colorization.om")
colorize = ColorizeProcess(KMODELPATH, kModelWidth, kModelHeight)
ret = colorize.Init()
if ret == FAILED:
Expand Down

0 comments on commit 37b7882

Please sign in to comment.