mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
[Model] Support PP-ShiTuV2 models for PaddleClas (#1900)
* [cmake] add faiss.cmake -> pp-shituv2 * [PP-ShiTuV2] Support PP-ShituV2-Det model * [PP-ShiTuV2] Support PP-ShiTuV2-Det model * [PP-ShiTuV2] Add PPShiTuV2Recognizer c++&python support * [PP-ShiTuV2] Add PPShiTuV2Recognizer c++&python support * [Bug Fix] fix ppshitu_pybind error * [benchmark] Add ppshituv2-det c++ benchmark * [examples] Add PP-ShiTuV2 det & rec examples * [vision] Update vision classification result * [Bug Fix] fix trt shapes setting errors
This commit is contained in:
Executable → Regular
+18
-14
@@ -18,7 +18,6 @@ PPDetBase::PPDetBase(const std::string& model_file,
|
||||
runtime_option.model_format = model_format;
|
||||
runtime_option.model_file = model_file;
|
||||
runtime_option.params_file = params_file;
|
||||
|
||||
}
|
||||
|
||||
std::unique_ptr<PPDetBase> PPDetBase::Clone() const {
|
||||
@@ -83,20 +82,25 @@ bool PPDetBase::BatchPredict(const std::vector<cv::Mat>& imgs,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PPDetBase::CheckArch(){
|
||||
std::vector<std::string> archs = {"SOLOv2","YOLO","SSD","RetinaNet","RCNN","Face","GFL","YOLOX","YOLOv5","YOLOv6","YOLOv7","RTMDet","FCOS","TTFNet","TOOD","DETR"};
|
||||
auto arch_ = preprocessor_.GetArch();
|
||||
for (auto item : archs) {
|
||||
if (arch_ == item) {
|
||||
return true;
|
||||
}
|
||||
bool PPDetBase::CheckArch() {
|
||||
// Add "PicoDet" arch for backward compability with the
|
||||
// old ppdet model, such as picodet from PaddleClas
|
||||
// PP-ShiTuV2 pipeline.
|
||||
std::vector<std::string> archs = {
|
||||
"SOLOv2", "YOLO", "SSD", "RetinaNet", "RCNN", "Face",
|
||||
"GFL", "YOLOX", "YOLOv5", "YOLOv6", "YOLOv7", "RTMDet",
|
||||
"FCOS", "TTFNet", "TOOD", "DETR", "PicoDet"};
|
||||
auto arch_ = preprocessor_.GetArch();
|
||||
for (auto item : archs) {
|
||||
if (arch_ == item) {
|
||||
return true;
|
||||
}
|
||||
FDWARNING << "Please set model arch,"
|
||||
<< "support value : SOLOv2, YOLO, SSD, RetinaNet, RCNN, Face , GFL , RTMDet ,"\
|
||||
<<"FCOS , TTFNet , TOOD , DETR." << std::endl;
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
FDWARNING << "Please set model arch,"
|
||||
<< "support value : SOLOv2, YOLO, SSD, RetinaNet, "
|
||||
<< "RCNN, Face , GFL , RTMDet ,"
|
||||
<< "FCOS , TTFNet , TOOD , DETR, PicoDet" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace detection
|
||||
|
||||
Reference in New Issue
Block a user