update Raw url
This commit is contained in:
Generated
+6
-1
@@ -13,6 +13,10 @@
|
|||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="4be586f9-7a61-4585-994f-eaa32375497d" name="Changes" comment="Changes">
|
<list default="true" id="4be586f9-7a61-4585-994f-eaa32375497d" name="Changes" comment="Changes">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Prj-Python/hyperlpr3/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/Prj-Python/hyperlpr3/__init__.py" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Prj-Python/hyperlpr3/config/configuration.py" beforeDir="false" afterPath="$PROJECT_DIR$/Prj-Python/hyperlpr3/config/configuration.py" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Prj-Python/hyperlpr3/config/settings.py" beforeDir="false" afterPath="$PROJECT_DIR$/Prj-Python/hyperlpr3/config/settings.py" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Prj-Python/hyperlpr3/hyperlpr3.py" beforeDir="false" afterPath="$PROJECT_DIR$/Prj-Python/hyperlpr3/hyperlpr3.py" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -22,6 +26,7 @@
|
|||||||
<component name="ClangdSettings">
|
<component name="ClangdSettings">
|
||||||
<option name="formatViaClangd" value="false" />
|
<option name="formatViaClangd" value="false" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="ExecutionTargetManager" SELECTED_TARGET="CMakeBuildProfile:Debug" />
|
||||||
<component name="FileTemplateManagerImpl">
|
<component name="FileTemplateManagerImpl">
|
||||||
<option name="RECENT_TEMPLATES">
|
<option name="RECENT_TEMPLATES">
|
||||||
<list>
|
<list>
|
||||||
@@ -120,7 +125,7 @@
|
|||||||
<workItem from="1677220611638" duration="33000" />
|
<workItem from="1677220611638" duration="33000" />
|
||||||
<workItem from="1677457111481" duration="10241000" />
|
<workItem from="1677457111481" duration="10241000" />
|
||||||
<workItem from="1677496149958" duration="6514000" />
|
<workItem from="1677496149958" duration="6514000" />
|
||||||
<workItem from="1677562836387" duration="3000" />
|
<workItem from="1677562836387" duration="1469000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
from .hyperlpr3 import LicensePlateCatcher
|
from .hyperlpr3 import LicensePlateCatcher
|
||||||
from .common.typedef import *
|
from .common.typedef import *
|
||||||
from .config.configuration import initialization
|
|
||||||
|
|
||||||
__version__ = "0.1.2"
|
__version__ = "0.1.3"
|
||||||
|
|
||||||
initialization()
|
|
||||||
|
|||||||
@@ -42,17 +42,22 @@ def down_model_zip(url, save_path, is_unzip=False):
|
|||||||
os.remove(name)
|
os.remove(name)
|
||||||
|
|
||||||
|
|
||||||
|
# def initialization(re_download=False):
|
||||||
|
# models_dir = os.path.join(_DEFAULT_FOLDER_, _MODEL_VERSION_, "onnx")
|
||||||
|
# os.makedirs(models_dir, exist_ok=True)
|
||||||
|
# for model_key in onnx_model_maps:
|
||||||
|
# save_path = onnx_runtime_config[model_key]
|
||||||
|
# basename = os.path.basename(save_path)
|
||||||
|
# remote_url = os.path.join(_REMOTE_URL_, basename + "?raw=true")
|
||||||
|
# down_path = os.path.join(models_dir, basename)
|
||||||
|
# if not os.path.exists(down_path) or re_download:
|
||||||
|
# down_model_file(remote_url, down_path)
|
||||||
|
|
||||||
def initialization(re_download=False):
|
def initialization(re_download=False):
|
||||||
models_dir = os.path.join(_DEFAULT_FOLDER_, _MODEL_VERSION_, "onnx")
|
os.makedirs(_DEFAULT_FOLDER_, exist_ok=True)
|
||||||
os.makedirs(models_dir, exist_ok=True)
|
models_dir = os.path.join(_DEFAULT_FOLDER_, _MODEL_VERSION_)
|
||||||
for model_key in onnx_model_maps:
|
|
||||||
save_path = onnx_runtime_config[model_key]
|
|
||||||
basename = os.path.basename(save_path)
|
|
||||||
remote_url = os.path.join(_REMOTE_URL_, basename + "?raw=true")
|
|
||||||
down_path = os.path.join(models_dir, basename)
|
|
||||||
if not os.path.exists(down_path) or re_download:
|
|
||||||
down_model_file(remote_url, down_path)
|
|
||||||
# print(models_dir)
|
# print(models_dir)
|
||||||
# if not os.path.exists(models_dir) or re_download:
|
if not os.path.exists(models_dir) or re_download:
|
||||||
# target_url = os.path.join(_ONLINE_URL_, _MODEL_VERSION_) + '.zip'
|
target_url = os.path.join(_ONLINE_URL_, _MODEL_VERSION_) + '.zip'
|
||||||
# down_model_zip(target_url, _DEFAULT_FOLDER_, True)
|
down_model_zip(target_url, _DEFAULT_FOLDER_, True)
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ if 'win32' in sys.platform:
|
|||||||
else:
|
else:
|
||||||
_DEFAULT_FOLDER_ = os.path.join(os.environ['HOME'], ".hyperlpr3")
|
_DEFAULT_FOLDER_ = os.path.join(os.environ['HOME'], ".hyperlpr3")
|
||||||
|
|
||||||
_ONLINE_URL_ = "https://tunm.oss-cn-hangzhou.aliyuncs.com/hyperlpr3/"
|
_ONLINE_URL_ = "http://hyperlpr.tunm.top/raw/"
|
||||||
|
|
||||||
onnx_runtime_config = dict(
|
onnx_runtime_config = dict(
|
||||||
det_model_path_320x=os.path.join(_MODEL_VERSION_, "onnx", "y5fu_320x_sim.onnx"),
|
det_model_path_320x=os.path.join(_MODEL_VERSION_, "onnx", "y5fu_320x_sim.onnx"),
|
||||||
|
|||||||
@@ -3,8 +3,11 @@ from .inference.pipeline import LPRMultiTaskPipeline
|
|||||||
from .common.typedef import *
|
from .common.typedef import *
|
||||||
from os.path import join
|
from os.path import join
|
||||||
from .config.settings import _DEFAULT_FOLDER_
|
from .config.settings import _DEFAULT_FOLDER_
|
||||||
|
from .config.configuration import initialization
|
||||||
|
|
||||||
|
|
||||||
|
initialization()
|
||||||
|
|
||||||
class LicensePlateCatcher(object):
|
class LicensePlateCatcher(object):
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user