generated from zhangwei/Train_Identify
parent
d8817e3d09
commit
c1273c545a
|
|
@ -116,9 +116,8 @@ model:
|
||||||
nms_threshold: 0.3
|
nms_threshold: 0.3
|
||||||
|
|
||||||
gc_http_open: 0
|
gc_http_open: 0
|
||||||
# gc_http_url: "http://192.168.2.211:20004/api/train-carriage/identification/video-save"
|
username: "guest_01"
|
||||||
# gc_gettoken_url: "http://192.168.2.211:20004/api/blade-auth/oauth/token"
|
password: "d55b0f642e817eea24725d2f2a31dd08" # 神东
|
||||||
# gc_image_srv: "http://192.168.2.211:9010/"
|
|
||||||
gc_http_url: "http://192.168.2.121:8081"
|
gc_http_url: "http://192.168.2.121:8081"
|
||||||
gc_gettoken_url: "http://192.168.0.121:20004/api/blade-auth/oauth/token"
|
gc_gettoken_url: "http://192.168.0.121:20004/api/blade-auth/oauth/token"
|
||||||
gc_image_srv: "http://192.168.0.121:9010/"
|
gc_image_srv: "http://192.168.0.121:9010/"
|
||||||
|
|
|
||||||
|
|
@ -190,32 +190,43 @@ void FilterTrainStepOneEngine::AddBackInfo(std::shared_ptr<ProcessData> pProcess
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TrainBackInfo trainBackInfoTop = stackBackInfo_.top();
|
TrainBackInfo trainBackInfoTop = stackBackInfo_.top();
|
||||||
// 2024年3月27日修改前
|
|
||||||
// if (trainBackInfoTop.strAllClassType != trainBackInfo.strAllClassType)
|
|
||||||
// {
|
|
||||||
// stackBackInfo_.push(trainBackInfo);
|
|
||||||
// LogDebug << "frameId:" << pProcessData->iFrameId << " push strAllClassType:" << strAllClassType
|
|
||||||
// << " stacksize:" << stackBackInfo_.size();
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (trainBackInfoTop.strAllClassType != trainBackInfo.strAllClassType)
|
if (trainBackInfoTop.strAllClassType != trainBackInfo.strAllClassType)
|
||||||
{
|
{
|
||||||
if (iDirection_ == DIRECTION_RIGHT
|
if (iDirection_ == DIRECTION_RIGHT
|
||||||
&& trainBackInfo.strAllClassType == "SPACE"
|
&& this->rightFirst_ == RIGHT_RUN_AND_PRO_FIRST
|
||||||
&& (trainBackInfoTop.strAllClassType == "PROSPACE" || trainBackInfoTop.strAllClassType == "SPACEPRO"))
|
&& ((trainBackInfo.strAllClassType == "SPACE"
|
||||||
|
&& (trainBackInfoTop.strAllClassType == "PROSPACE" || trainBackInfoTop.strAllClassType == "SPACEPRO"))
|
||||||
|
|| (trainBackInfo.strAllClassType == "NUM"
|
||||||
|
&& (trainBackInfoTop.strAllClassType == "NUMSPACE" || trainBackInfoTop.strAllClassType == "SPACENUM"))))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (iDirection_ == DIRECTION_RIGHT
|
if (iDirection_ == DIRECTION_RIGHT
|
||||||
&& trainBackInfo.strAllClassType == "SPACE"
|
&& this->rightFirst_ == RIGHT_RUN_AND_NUM_FIRST
|
||||||
&& (trainBackInfoTop.strAllClassType == "NUMSPACE" || trainBackInfoTop.strAllClassType == "SPACENUM"))
|
&& ((trainBackInfo.strAllClassType == "SPACE"
|
||||||
|
&& (trainBackInfoTop.strAllClassType == "NUMSPACE" || trainBackInfoTop.strAllClassType == "SPACENUM"))
|
||||||
|
|| (trainBackInfo.strAllClassType == "PRO"
|
||||||
|
&& (trainBackInfoTop.strAllClassType == "PROSPACE" || trainBackInfoTop.strAllClassType == "SPACEPRO"))))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iDirection_ == DIRECTION_LEFT
|
if (iDirection_ == DIRECTION_LEFT
|
||||||
&& trainBackInfo.strAllClassType == "SPACE"
|
&& this->rightFirst_ == RIGHT_RUN_AND_NUM_FIRST
|
||||||
&& (trainBackInfoTop.strAllClassType == "NUMSPACE" || trainBackInfoTop.strAllClassType == "SPACENUM"))
|
&& ((trainBackInfo.strAllClassType == "SPACE"
|
||||||
|
&& (trainBackInfoTop.strAllClassType == "NUMSPACE" || trainBackInfoTop.strAllClassType == "SPACENUM"))
|
||||||
|
|| (trainBackInfo.strAllClassType == "PRO"
|
||||||
|
&& (trainBackInfoTop.strAllClassType == "PROSPACE" || trainBackInfoTop.strAllClassType == "SPACEPRO"))))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (iDirection_ == DIRECTION_LEFT
|
||||||
|
&& this->rightFirst_ == RIGHT_RUN_AND_PRO_FIRST
|
||||||
|
&& ((trainBackInfo.strAllClassType == "SPACE"
|
||||||
|
&& (trainBackInfoTop.strAllClassType == "PROSPACE" || trainBackInfoTop.strAllClassType == "SPACEPRO"))
|
||||||
|
|| (trainBackInfo.strAllClassType == "NUM"
|
||||||
|
&& (trainBackInfoTop.strAllClassType == "NUMSPACE" || trainBackInfoTop.strAllClassType == "SPACENUM"))))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -813,6 +813,8 @@ APP_ERROR TransTrainEngine::Process()
|
||||||
}
|
}
|
||||||
|
|
||||||
pProcessData->pVoidData = std::static_pointer_cast<void>(pTransData);
|
pProcessData->pVoidData = std::static_pointer_cast<void>(pTransData);
|
||||||
|
|
||||||
|
LogInfo << " FrameID:" << pProcessData->iFrameId << " 来车时间:" << pProcessData->strTrainName;
|
||||||
// push端口0,车号属性选优处理
|
// push端口0,车号属性选优处理
|
||||||
PushData(strPort0_, pProcessData);
|
PushData(strPort0_, pProcessData);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -194,14 +194,19 @@ void TrainStepOneEngine::FilterInvalidInfo(std::vector<stDetection> &vecRet, std
|
||||||
std::vector<stDetection> vecSpaceInfo;
|
std::vector<stDetection> vecSpaceInfo;
|
||||||
for (auto it = vecRet.begin(); it != vecRet.end();)
|
for (auto it = vecRet.begin(); it != vecRet.end();)
|
||||||
{
|
{
|
||||||
|
float centre_x = it->bbox[0] + (it->bbox[2]-it->bbox[0])/2;
|
||||||
|
float centre_y = it->bbox[1] + (it->bbox[3]-it->bbox[1])/2;
|
||||||
LogDebug << "frameId:" << pProcessData->iFrameId
|
LogDebug << "frameId:" << pProcessData->iFrameId
|
||||||
<< " bigclassid:" << it->class_id << " ltx:" << it->bbox[0] << " lty:" << it->bbox[1]
|
<< " bigclassid:" << it->class_id
|
||||||
<< " rbx:" << it->bbox[2] << " rby:" << it->bbox[3];
|
<< " centre_x:" << centre_x << " centre_y:" << centre_y
|
||||||
|
<< " lt[" << it->bbox[0] << "," << it->bbox[1] << "] "
|
||||||
|
<< " rb[" << it->bbox[2] << "," << it->bbox[3] << "]";
|
||||||
|
|
||||||
// 根据配置文件中 设置的识别范围,过滤掉无效数据
|
// 根据配置文件中 设置的识别范围,过滤掉无效数据
|
||||||
if (!(it->bbox[0] >= dataSourceCfg.fIdentifyAreasLTX &&
|
if (!(it->bbox[0] >= dataSourceCfg.fIdentifyAreasLTX &&
|
||||||
it->bbox[1] >= dataSourceCfg.fIdentifyAreasLTY &&
|
it->bbox[2] <= dataSourceCfg.fIdentifyAreasRBX &&
|
||||||
it->bbox[2] <= dataSourceCfg.fIdentifyAreasRBX &&
|
it->bbox[1] >= dataSourceCfg.fIdentifyAreasLTY &&
|
||||||
it->bbox[3] <= dataSourceCfg.fIdentifyAreasRBY))
|
it->bbox[3] <= dataSourceCfg.fIdentifyAreasRBY))
|
||||||
{
|
{
|
||||||
LogDebug << "frameId:" << pProcessData->iFrameId
|
LogDebug << "frameId:" << pProcessData->iFrameId
|
||||||
<< " bigclassid:" << it->class_id << " 超出识别区域-识别区域:("
|
<< " bigclassid:" << it->class_id << " 超出识别区域-识别区域:("
|
||||||
|
|
|
||||||
|
|
@ -239,7 +239,7 @@ APP_ERROR TrainStepTwoEngine::Process()
|
||||||
|
|
||||||
// push端口0,第1步推理
|
// push端口0,第1步推理
|
||||||
pProcessData->pVoidData = std::static_pointer_cast<void>(pPostData);
|
pProcessData->pVoidData = std::static_pointer_cast<void>(pPostData);
|
||||||
iRet = outputQueMap_[strPort0_]->push(std::static_pointer_cast<void>(pProcessData));
|
iRet = outputQueMap_[strPort0_]->push(std::static_pointer_cast<void>(pProcessData), true);
|
||||||
// PushData(strPort0_, pProcessData);
|
// PushData(strPort0_, pProcessData);
|
||||||
}
|
}
|
||||||
return APP_ERR_OK;
|
return APP_ERR_OK;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue