Przeglądaj źródła

更新

tags/V2.6.0^2
chenyukun 1 rok temu
rodzic
commit
163072c59c
8 zmienionych plików z 58 dodań i 24 usunięć
  1. +9
    -2
      .idea/deployment.xml
  2. +1
    -0
      .idea/sshConfigs.xml
  3. +7
    -0
      .idea/webServers.xml
  4. +31
    -14
      .idea/workspace.xml
  5. +3
    -3
      concurrency/IntelligentRecognitionProcess.py
  6. +1
    -1
      dsp_application.yml
  7. +3
    -3
      test/kafka/producer_start.py
  8. +3
    -1
      util/ModelUtils.py

+ 9
- 2
.idea/deployment.xml Wyświetl plik

@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" autoUpload="Always" serverName="dell@192.168.10.12:22" remoteFilesAllowedToDisappearOnAutoupload="false">
<component name="PublishConfigData" autoUpload="Always" serverName="10.21" remoteFilesAllowedToDisappearOnAutoupload="false">
<serverData>
<paths name="10.21">
<serverdata>
<mappings>
<mapping deploy="/home/th/chenyukun/algSch" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
<paths name="66">
<serverdata>
<mappings>
@@ -35,7 +42,7 @@
<paths name="thsw2@192.168.10.66:22">
<serverdata>
<mappings>
<mapping deploy="/home/thsw2/tuo_heng/prod/algSch" local="$PROJECT_DIR$" web="/" />
<mapping deploy="/home/chenyukun/algSch" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>

+ 1
- 0
.idea/sshConfigs.xml Wyświetl plik

@@ -3,6 +3,7 @@
<component name="SshConfigs">
<configs>
<sshConfig authType="PASSWORD" host="192.168.10.66" id="aa89844a-f7c0-47b6-9359-30d13fa76380" port="22" nameFormat="DESCRIPTIVE" username="thsw2" />
<sshConfig authType="PASSWORD" host="192.168.10.21" id="adf5e1da-4910-4668-bfbb-432f4e2ae77c" port="22" nameFormat="DESCRIPTIVE" username="th" />
</configs>
</component>
</project>

+ 7
- 0
.idea/webServers.xml Wyświetl plik

@@ -16,6 +16,13 @@
</advancedOptions>
</fileTransfer>
</webServer>
<webServer id="c24476df-a574-465f-9529-a8e029b84f34" name="10.21">
<fileTransfer accessType="SFTP" host="192.168.10.21" port="22" sshConfigId="adf5e1da-4910-4668-bfbb-432f4e2ae77c" sshConfig="th@192.168.10.21:22 password">
<advancedOptions>
<advancedOptions dataProtectionLevel="Private" keepAliveTimeout="0" passiveMode="true" shareSSLContext="true" />
</advancedOptions>
</fileTransfer>
</webServer>
</option>
</component>
</project>

+ 31
- 14
.idea/workspace.xml Wyświetl plik

@@ -5,9 +5,13 @@
</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/sshConfigs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/sshConfigs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/webServers.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/webServers.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/concurrency/IntelligentRecognitionProcess.py" beforeDir="false" afterPath="$PROJECT_DIR$/concurrency/IntelligentRecognitionProcess.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/service/Dispatcher.py" beforeDir="false" afterPath="$PROJECT_DIR$/service/Dispatcher.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dsp_application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/dsp_application.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/kafka/producer_start.py" beforeDir="false" afterPath="$PROJECT_DIR$/test/kafka/producer_start.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/util/ModelUtils.py" beforeDir="false" afterPath="$PROJECT_DIR$/util/ModelUtils.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@@ -134,7 +138,7 @@
<property name="WebServerToolWindowPanel.toolwindow.show.date" value="false" />
<property name="WebServerToolWindowPanel.toolwindow.show.permissions" value="false" />
<property name="WebServerToolWindowPanel.toolwindow.show.size" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../code/river/river_demo" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../newcode/hhz/tuoheng_hhz" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.detected.package.tslint" value="true" />
<property name="node.js.selected.package.eslint" value="(autodetect)" />
@@ -159,7 +163,7 @@
<recent name="D:\work\alg\tuoheng_alg\image" />
</key>
</component>
<component name="RunManager" selected="Python.aa">
<component name="RunManager" selected="Python.producer_start1">
<configuration name="aa" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="tuoheng_alg" />
<option name="INTERPRETER_OPTIONS" value="" />
@@ -248,7 +252,7 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="test" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<configuration name="producer_start1" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="tuoheng_alg" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
@@ -256,12 +260,12 @@
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="$PROJECT_DIR$/../../../software/anaconda/envs/test/python.exe" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/test/while" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/test/kafka" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/test/while/test.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/test/kafka/producer_start.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
@@ -270,7 +274,7 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="test2" type="PythonConfigurationType" factoryName="Python" temporary="true">
<configuration name="test" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="tuoheng_alg" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
@@ -278,12 +282,12 @@
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="$PROJECT_DIR$/../../../software/anaconda/envs/test/python.exe" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/test/str" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/test/while" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/test/str/test.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/test/while/test.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
@@ -294,19 +298,19 @@
</configuration>
<list>
<item itemvalue="Python.mysqltest" />
<item itemvalue="Python.producer_start" />
<item itemvalue="Python.test" />
<item itemvalue="Python.test2" />
<item itemvalue="Python.aa" />
<item itemvalue="Python.producer_start" />
<item itemvalue="Python.ffmpeg33" />
<item itemvalue="Python.producer_start1" />
</list>
<recent_temporary>
<list>
<item itemvalue="Python.producer_start1" />
<item itemvalue="Python.aa" />
<item itemvalue="Python.ffmpeg33" />
<item itemvalue="Python.producer_start" />
<item itemvalue="Python.test" />
<item itemvalue="Python.test2" />
</list>
</recent_temporary>
</component>
@@ -372,7 +376,19 @@
<workItem from="1670484573639" duration="7495000" />
<workItem from="1670545327661" duration="1911000" />
<workItem from="1670573239165" duration="15919000" />
<workItem from="1670893670201" duration="6237000" />
<workItem from="1670893670201" duration="9457000" />
<workItem from="1670976721564" duration="5457000" />
<workItem from="1671067024950" duration="576000" />
<workItem from="1671427932628" duration="2256000" />
<workItem from="1671445227735" duration="582000" />
<workItem from="1671606515022" duration="4520000" />
<workItem from="1672047085940" duration="72000" />
<workItem from="1672119186060" duration="628000" />
<workItem from="1672192765984" duration="1002000" />
<workItem from="1672273700875" duration="1315000" />
<workItem from="1672295805200" duration="19000" />
<workItem from="1672709979593" duration="2445000" />
<workItem from="1672797232144" duration="593000" />
</task>
<servers />
</component>
@@ -431,10 +447,11 @@
<SUITE FILE_PATH="coverage/tuoheng_alg___$producer_start1.coverage" NAME="producer_start1 覆盖结果" MODIFIED="1668437822632" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="/home/thsw/chenyukun/algSch/test/kafka" />
<SUITE FILE_PATH="coverage/tuoheng_alg$KafkaUtils__1_.coverage" NAME="KafkaUtils (1) Coverage Results" MODIFIED="1663464961001" 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_alg$minio.coverage" NAME="minio 覆盖结果" MODIFIED="1667465702864" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/test/minio1" />
<SUITE FILE_PATH="coverage/tuoheng_alg$producer_start.coverage" NAME="producer_start 覆盖结果" MODIFIED="1669863131279" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="/home/chenyukun/algSch/test/kafka/" />
<SUITE FILE_PATH="coverage/tuoheng_alg$producer_start.coverage" NAME="producer_start1 覆盖结果" MODIFIED="1670999187123" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/test/kafka" />
<SUITE FILE_PATH="coverage/tuoheng_alg___$producer_start.coverage" NAME="producer_start 覆盖结果" MODIFIED="1668522825199" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="/home/thsw/chenyukun/algSch" />
<SUITE FILE_PATH="coverage/tuoheng_alg$dsp_master.coverage" NAME="dsp_master Coverage Results" MODIFIED="1663403978477" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/tuoheng_alg___$ffmpeg11.coverage" NAME="ffmpeg11 覆盖结果" MODIFIED="1668410004435" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/test/ffmpeg11" />
<SUITE FILE_PATH="coverage/tuoheng_alg$producer_start1.coverage" NAME="producer_start1 覆盖结果" MODIFIED="1671428635702" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/test/kafka" />
<SUITE FILE_PATH="coverage/tuoheng_alg___$3.coverage" NAME="协程3 覆盖结果" MODIFIED="1668147029048" 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$read.coverage" NAME="read Coverage Results" MODIFIED="1663640070956" 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$ffmpeg22.coverage" NAME="aa 覆盖结果" MODIFIED="1667350492259" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="/opt/tuo_heng" />

+ 3
- 3
concurrency/IntelligentRecognitionProcess.py Wyświetl plik

@@ -227,8 +227,8 @@ class OnlineIntelligentRecognitionProcess(IntelligentRecognitionProcess):
time.sleep(0.02)
continue
if frames is not None and len(frames) > 0:
aaa = time.time()
aaf = len(frames)
# aaa = time.time()
# aaf = len(frames)
for result in t.map(process, frames):
if result is not None:
p_result, frame_all, frame_merge = result
@@ -364,7 +364,7 @@ class OnlineIntelligentRecognitionProcess(IntelligentRecognitionProcess):
loop.close()
self.stop_task(cv2tool, pullProcess, AnalysisStatus.TIMEOUT.value)
break
print("aaaaaaaaaaaaaaaaaaaa", time.time() - aaa, aaf, (time.time() - aaa) / aaf)
# print("aaaaaaaaaaaaaaaaaaaa", time.time() - aaa, aaf, (time.time() - aaa) / aaf)
if status is None:
continue
if status.get("status") == "1":

+ 1
- 1
dsp_application.yml Wyświetl plik

@@ -67,7 +67,7 @@ kafka:
enable_auto_commit: False
max_poll_records: 1
prod:
bootstrap_servers: ['101.132.127.1:19092']
bootstrap_servers: ['101.132.127.1:19094', '101.132.127.1:29094', '101.132.127.1:39094']
# dsp-alg-online-tasks:
# partition: [1]
# dsp-alg-offline-tasks:

+ 3
- 3
test/kafka/producer_start.py Wyświetl plik

@@ -6,7 +6,7 @@ from kafka import KafkaProducer
import json
import threading

# topicName = 'dsp-alg-online-tasks'
topicName = 'dsp-alg-online-tasks'
# eBody = {
# "request_id": "d4c909912ac741ce81ccef03fd1b2ec45",
# "models": [
@@ -49,7 +49,7 @@ import threading
# result = future.get(timeout=10)
# print(result)

topicName = 'dsp-alg-image-tasks'
# topicName = 'dsp-alg-image-tasks'
eBody = {
"request_id": "d4c909912ac741ce81ccef03fd1b2ec46",
"models": [
@@ -141,7 +141,7 @@ eBody = {
# "push_url": "rtmp://live.push.t-aaron.com/live/THSAr",
# "results_base_dir": "P20220802133841159"
# }
producer = KafkaProducer(bootstrap_servers=['106.14.96.218:19092'],
producer = KafkaProducer(bootstrap_servers=['101.132.127.1:19094','101.132.127.1:29094','101.132.127.1:39094'],
value_serializer=lambda m: json.dumps(m).encode('utf-8'))
future = producer.send(topicName, key=b'd4c909912ac741ce81ccef03fd1b2ec46', value=eBody)
result = future.get(timeout=10)

+ 3
- 1
util/ModelUtils.py Wyświetl plik

@@ -47,6 +47,7 @@ class SZModel(Model):
raise Exception("未匹配到该GPU名称的模型, GPU: " + gpu.name)
if self.trtFlag_det:
logger = trt.Logger(trt.Logger.ERROR)

with open("../AIlib/weights/yolov5/class8/bestcao_%s_fp16.engine" % gpuname, "rb") as f, trt.Runtime(
logger) as runtime:
self.model = runtime.deserialize_cuda_engine(f.read()) # 输入trt本地文件,返回ICudaEngine对象
@@ -221,7 +222,8 @@ class IMModel:
'plate': {'weights': '../AIlib/weights/jkm/plate_yolov5s_v3.jit', 'img_type': 'plate', 'nc': 1},
'conf_thres': 0.4,
'iou_thres': 0.45,
'device': 'cuda:%s' % device,
#'device': 'cuda:%s' % device,
'device': 'cuda:%s' % '0',
'plate_dilate': (0.5, 0.3)
}
self.device = torch.device(self.par['device'])

Ładowanie…
Anuluj
Zapisz