#3 dsp修改模型cuda指定默认为0

Спојено
chenyukun споји(ла) 1 комит(е) из release у develop пре 2 година
  1. +16
    -2
      .idea/deployment.xml
  2. +5
    -2
      .idea/workspace.xml
  3. +3
    -3
      test/baidusdk/baidusdk.py
  4. +2
    -2
      util/ModelUtils.py

+ 16
- 2
.idea/deployment.xml Прегледај датотеку

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" autoUpload="Always" remoteFilesAllowedToDisappearOnAutoupload="false">
<component name="PublishConfigData" autoUpload="Always" serverName="thsw2@192.168.10.66:22" remoteFilesAllowedToDisappearOnAutoupload="false">
<serverData>
<paths name="10.11">
<serverdata>
@@ -56,7 +56,7 @@
<paths name="thsw2@192.168.10.66:22">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="/" />
<mapping deploy="/home/thsw2/tuo_heng/prod/fk" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
@@ -67,6 +67,20 @@
</mappings>
</serverdata>
</paths>
<paths name="thsw@192.168.10.11:22">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
<paths name="thsw@212.129.223.66:6000">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
</serverData>
<option name="myAutoUpload" value="ALWAYS" />
</component>

+ 5
- 2
.idea/workspace.xml Прегледај датотеку

@@ -5,6 +5,7 @@
</component>
<component name="ChangeListManager">
<list default="true" id="4f7dccd9-8f92-4a6e-90cc-33890d102263" name="Changes" comment="Changes">
<change beforePath="$PROJECT_DIR$/.idea/deployment.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/deployment.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/baidusdk/baidusdk.py" beforeDir="false" afterPath="$PROJECT_DIR$/test/baidusdk/baidusdk.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/util/ModelUtils.py" beforeDir="false" afterPath="$PROJECT_DIR$/util/ModelUtils.py" afterDir="false" />
@@ -362,7 +363,9 @@
<workItem from="1668146121972" duration="2387000" />
<workItem from="1668423781277" duration="652000" />
<workItem from="1668478677307" duration="214000" />
<workItem from="1668495580103" duration="3688000" />
<workItem from="1668495580103" duration="4299000" />
<workItem from="1668557058851" duration="7348000" />
<workItem from="1668729963723" duration="1367000" />
</task>
<servers />
</component>
@@ -414,7 +417,7 @@
<SUITE FILE_PATH="coverage/tuoheng_fk$image.coverage" NAME="image 覆盖结果" MODIFIED="1667547816366" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/test/协程" />
<SUITE FILE_PATH="coverage/tuoheng_alg$TimeUtils.coverage" NAME="TimeUtils Coverage Results" MODIFIED="1661222768678" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/tuoheng_fk_python$aaliyunsdk.coverage" NAME="ailiyunsdk2 覆盖结果" MODIFIED="1667959131471" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="/home/chenyukun/fk/test/baidusdk" />
<SUITE FILE_PATH="coverage/tuoheng_fk_python$baidusdk.coverage" NAME="baidusdk 覆盖结果" MODIFIED="1668497658048" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="/home/chenyukun/fk" />
<SUITE FILE_PATH="coverage/tuoheng_fk_python$baidusdk.coverage" NAME="baidusdk 覆盖结果" MODIFIED="1668732696180" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="/home/chenyukun/fk" />
<SUITE FILE_PATH="coverage/tuoheng_fk$Dispatcher.coverage" NAME="Dispatcher 覆盖结果" MODIFIED="1667810228478" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/service" />
<SUITE FILE_PATH="coverage/tuoheng_alg$3.coverage" NAME="视频添加文字水印3 Coverage Results" MODIFIED="1661906152928" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/test" />
</component>

+ 3
- 3
test/baidusdk/baidusdk.py Прегледај датотеку

@@ -8,7 +8,7 @@ client = AipOcr(str(28173504), 'kqrFE7VuygIaFer7z6cRxzoi',
'yp7xBokyl4TItyGhay7skAN1cMwfvEXf')
# client = AipOcr(str(28324292), 'l58x9bqCsPOpyexGqrM86jhy',
# '1qECRaULUZBfOPejVIWUGLahUHGMQoni')
im0 = cv2.imread('/home/chenyukun/healthCode/imgs/jkm/1668493089006.jpg')
im0 = cv2.imread('/home/chenyukun/healthCode/imgs/jkm/il4g3jm4y27_1668730977634.jfif_phoneNumberImage.jpg')

or_result, or_image = cv2.imencode(".jpg", im0)
# with open("/home/chenyukun/fk/fk_application.yml", 'r', encoding='utf-8') as f:
@@ -21,8 +21,8 @@ or_result, or_image = cv2.imencode(".jpg", im0)

def aa(a):
# res_image = orc.universal_text_recognition(im0,'aaaaaaaa')
res_image = client.licensePlate(or_image.tobytes())
# res_image = client.basicGeneral(or_image.tobytes())
# res_image = client.licensePlate(or_image.tobytes())
res_image = client.basicGeneral(or_image.tobytes())
# res_image = orc.license_plate_recognition(im0,'aa')
print(res_image)
# print(res_image1)

+ 2
- 2
util/ModelUtils.py Прегледај датотеку

@@ -33,13 +33,13 @@ class FKModel(Model):
def process(self, im0, device, img_type):
try:
# 预处理
img, padInfos = pre_process(im0, device)
img, padInfos = pre_process(im0, self.device)
# 模型推理 code, plate
if img_type == 'code':
pred = self.model(img)
if img_type == 'plate':
pred = self.model_plate(img)
boxes = post_process(pred, padInfos, device, conf_thres=self.par['conf_thres'],
boxes = post_process(pred, padInfos, self.device, conf_thres=self.par['conf_thres'],
iou_thres=self.par['iou_thres'],
nc=self.par[img_type]['nc']) # 后处理
dataBack = get_return_data(im0, boxes, modelType=img_type, plate_dilate=self.par['plate_dilate'])

Loading…
Откажи
Сачувај