feat
fix seg cache debug
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@@ -6,6 +7,8 @@ from app.core.config import SEG_CACHE_PATH
|
|||||||
from ..builder import PIPELINES
|
from ..builder import PIPELINES
|
||||||
from ...utils.design_ensemble import get_seg_result
|
from ...utils.design_ensemble import get_seg_result
|
||||||
|
|
||||||
|
logger = logging.getLogger()
|
||||||
|
|
||||||
|
|
||||||
@PIPELINES.register_module()
|
@PIPELINES.register_module()
|
||||||
class Segmentation(object):
|
class Segmentation(object):
|
||||||
@@ -39,6 +42,7 @@ class Segmentation(object):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def load_seg_result(image_id):
|
def load_seg_result(image_id):
|
||||||
file_path = f"{SEG_CACHE_PATH}{image_id}.npy"
|
file_path = f"{SEG_CACHE_PATH}{image_id}.npy"
|
||||||
|
logger.info(f"load seg file name is :{SEG_CACHE_PATH}{image_id}.npy")
|
||||||
try:
|
try:
|
||||||
seg_result = np.load(file_path)
|
seg_result = np.load(file_path)
|
||||||
return True, seg_result
|
return True, seg_result
|
||||||
|
|||||||
Reference in New Issue
Block a user