Browse Source

交通模型修改

release_back
chenyukun 2 years ago
parent
commit
88e3a2e0da
3 changed files with 8 additions and 5 deletions
  1. +5
    -2
      .idea/workspace.xml
  2. +2
    -2
      concurrency/IntelligentRecognitionProcess.py
  3. +1
    -1
      util/ModelUtils.py

+ 5
- 2
.idea/workspace.xml View File

@@ -6,7 +6,8 @@
<component name="ChangeListManager">
<list default="true" id="4f7dccd9-8f92-4a6e-90cc-33890d102263" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/util/Cv2Utils.py" beforeDir="false" afterPath="$PROJECT_DIR$/util/Cv2Utils.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/concurrency/IntelligentRecognitionProcess.py" beforeDir="false" afterPath="$PROJECT_DIR$/concurrency/IntelligentRecognitionProcess.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" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -346,7 +347,9 @@
<workItem from="1663515200540" duration="648000" />
<workItem from="1663545195142" duration="3595000" />
<workItem from="1663631838059" duration="7995000" />
<workItem from="1664253194092" duration="67000" />
<workItem from="1664253194092" duration="121000" />
<workItem from="1664253821529" duration="612000" />
<workItem from="1664268388633" duration="867000" />
</task>
<servers />
</component>

+ 2
- 2
concurrency/IntelligentRecognitionProcess.py View File

@@ -557,8 +557,8 @@ def get_model(args):
logger.info("######################加载林场模型######################")
return ModelUtils.LCModel(args[1], needed_objectsIndex), code, args[0].get("lc")
elif code == ModelType.TRAFFIC_FARM_MODEL.value[1]:
logger.info("######################加载林场模型######################")
return ModelUtils.LCModel(args[1], needed_objectsIndex), code, args[0].get("rf")
logger.info("######################加载交通模型######################")
return ModelUtils.RFModel(args[1], needed_objectsIndex), code, args[0].get("rf")
else:
logger.error("未匹配到对应的模型")
raise ServiceException(ExceptionType.AI_MODEL_MATCH_EXCEPTION.value[0],

+ 1
- 1
util/ModelUtils.py View File

@@ -57,7 +57,7 @@ class RFModel(Model):
super().__init__(device, allowedList)
self.device = select_device(self.device_)
self.half = self.device.type != 'cpu' # half precision only supported on CUDA
self.model = attempt_load("../AIlib/weights/load/best.pt", map_location=self.device) # load FP32 model
self.model = attempt_load("../AIlib/weights/road/best.pt", map_location=self.device) # load FP32 model
if self.half:
self.model.half()
self.segmodel = None

Loading…
Cancel
Save