diff --git a/deploy/pipeline/README.md b/deploy/pipeline/README.md
index 19534194700f4dcc270e63840302303d784e508b..b4fd9b858b83be0c8eee9f4d323a47d55a9dceeb 100644
--- a/deploy/pipeline/README.md
+++ b/deploy/pipeline/README.md
@@ -35,10 +35,10 @@
| ⭐ 功能 | 💟 方案优势 | 💡示例图 |
| ---------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
-| **车牌识别** | 超强性能:针对车辆密集、车牌大小不一问题进行优化,实现【待补充】 | |
-| **车辆属性分析** | 支持车型、颜色类别识别
兼容多种数据格式:支持图片、视频、在线视频流输入
高性能:融合开源数据集与企业真实数据进行训练,实现【待补充】
| |
-| **违章检测** | 易用性高:一行命令即可实现违停检测
鲁棒性强:对光照、视角、背景环境无限制 | |
-| **车流量计数** | 一键运行:单个参数即可开启车流量计数与轨迹记录功能 | |
+| **车牌识别** | 支持传统车牌和新能源绿色车牌
车牌识别采用长间隔采样识别与多次结果统计投票方式,算力消耗少,识别精度高,结果稳定性好。 检测模型 hmean: 0.979; 识别模型 acc: 0.773 | |
+| **车辆属性分析** | 支持多种车型、颜色类别识别
使用更强力的Backbone模型PP-HGNet、PP-LCNet,精度高、速度快。识别精度: 90.81 | |
+| **违章检测** | 简单易用:一行命令即可实现违停检测,自定义设置区域
检测、跟踪效果好,可实现违停车辆车牌识别 | |
+| **车流量计数** | 简单易用:一行命令即可开启功能,自定义出入位置
可提供目标跟踪轨迹显示,统计准确度高 | |
## 🗳 模型库
@@ -53,6 +53,7 @@
| 行人检测(轻量级) | 16.2ms | [多目标跟踪](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_s_36e_pipeline.zip) | 27M |
| 行人跟踪(高精度) | 31.8ms | [多目标跟踪](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip) | 182M |
| 行人跟踪(轻量级) | 21.0ms | [多目标跟踪](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_s_36e_pipeline.zip) | 27M |
+| 跨镜跟踪(REID) | 单人1.5ms | [REID](https://bj.bcebos.com/v1/paddledet/models/pipeline/reid_model.zip) | REID:92M |
| 属性识别(高精度) | 单人8.5ms | [目标检测](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip)
[属性识别](https://bj.bcebos.com/v1/paddledet/models/pipeline/strongbaseline_r50_30e_pa100k.zip) | 目标检测:182M
属性识别:86M |
| 属性识别(轻量级) | 单人7.1ms | [目标检测](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip)
[属性识别](https://bj.bcebos.com/v1/paddledet/models/pipeline/strongbaseline_r50_30e_pa100k.zip) | 目标检测:182M
属性识别:86M |
| 摔倒识别 | 单人10ms | [多目标跟踪](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip)
[关键点检测](https://bj.bcebos.com/v1/paddledet/models/pipeline/dark_hrnet_w32_256x192.zip)
[基于关键点行为识别](https://bj.bcebos.com/v1/paddledet/models/pipeline/STGCN.zip) | 多目标跟踪:182M
关键点检测:101M
基于关键点行为识别:21.8M |
diff --git a/deploy/pipeline/README_en.md b/deploy/pipeline/README_en.md
index 8ddd1b5ceb3277ed4f74489cffb28d952778cf58..eeb3a7eed752c1129631d9ea481d8d0179942d9a 100644
--- a/deploy/pipeline/README_en.md
+++ b/deploy/pipeline/README_en.md
@@ -1,27 +1,31 @@
[简体中文](README.md) | English
-# Real Time Pedestrian Analysis Tool PP-Human
+
-**PP-Human is the industry's first open-sourced real-time pedestrian analysis tool based on PaddlePaddle deep learning framework. It has three major features: rich functions, wide application, and efficient deployment.**
+**PaddleDetection has provide out-of-the-box tools in pedestrian and vehicle analysis, and it support multiple input format such as images/videos/multi-videos/online video streams. This make it popular in smart-city\smart transportation and so on. It can be deployed easily with GPU server and TensorRT, which achieves real-time performace.**
+- 🚶♂️🚶♀️ **PP-Human has four major toolbox for pedestrian analysis: five example of behavior analysis、26 attributes recognition、in-out counting、multi-target-multi-camera tracking(REID).**
+- 🚗🚙 **PP-Vehicle has four major toolbox for vehicle analysis: The license plate recognition、vechile attributes、in-out counting、illegal_parking recognition.**
-![](https://user-images.githubusercontent.com/22989727/178965250-14be25c1-125d-4d90-8642-7a9b01fecbe2.gif)
-
-
-
-PP-Human supports various inputs such as images, single-camera, and multi-camera videos. It covers multi-object tracking, attributes recognition, behavior analysis, visitor traffic statistics, and trace records. PP-Human can be applied to fields including Smart Transportation, Smart Community, and industrial inspections. It can also be deployed on server sides and TensorRT accelerator. On the T4 server, it could achieve real-time analysis.
+![](https://user-images.githubusercontent.com/48054808/184843170-c3ef7d29-913b-4c6e-b533-b83892a8b0e2.gif)
## 📣 Updates
-- 🔥 **2022.7.13:PP-Human v2 launched with a full upgrade of four industrial features: behavior analysis, attributes recognition, visitor traffic statistics and ReID. It provides a strong core algorithm for pedestrian detection, tracking and attribute analysis with a simple and detailed development process and model optimization strategy.**
+- 🔥🔥🔥 **2022.8.20:PP-Vehicle was first launched with four major toolbox for vehicle analysis,and it also provide detailed documentation for user to train with their own datas and model optimize.**
+- 🔥 2022.7.13:PP-Human v2 launched with a full upgrade of four industrial features: behavior analysis, attributes recognition, visitor traffic statistics and ReID. It provides a strong core algorithm for pedestrian detection, tracking and attribute analysis with a simple and detailed development process and model optimization strategy.
- 2022.4.18: Add PP-Human practical tutorials, including training, deployment, and action expansion. Details for AIStudio project please see [Link](https://aistudio.baidu.com/aistudio/projectdetail/3842982)
- 2022.4.10: Add PP-Human examples; empower refined management of intelligent community management. A quick start for AIStudio [Link](https://aistudio.baidu.com/aistudio/projectdetail/3679564)
- 2022.4.5: Launch the real-time pedestrian analysis tool PP-Human. It supports pedestrian tracking, visitor traffic statistics, attributes recognition, and falling detection. Due to its specific optimization of real-scene data, it can accurately recognize various falling gestures, and adapt to different environmental backgrounds, light and camera angles.
+![](https://user-images.githubusercontent.com/48054808/184843170-c3ef7d29-913b-4c6e-b533-b83892a8b0e2.gif)
+
+
## 🔮 Features and demonstration
+### PP-Human
+
| ⭐ Feature | 💟 Advantages | 💡Example |
| -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| **ReID** | Extraordinary performance: special optimization for technical challenges such as target occlusion, uncompleted and blurry objects to achieve mAP 98.8, 1.5ms/person | |
@@ -29,6 +33,16 @@ PP-Human supports various inputs such as images, single-camera, and multi-camera
| **Behaviour detection** | Rich function: support five high-frequency anomaly behavior detection of falling, fighting, smoking, telephoning, and intrusion
Robust: unlimited by different environmental backgrounds, light, and camera angles.
High performance: Compared with video recognition technology, it takes significantly smaller computation resources; support localization and service-oriented rapid deployment
Fast training: only takes 15 minutes to produce high precision behavior detection models | |
| **Visitor traffic statistics**
**Trace record** | Simple and easy to use: single parameter to initiate functions of visitor traffic statistics and trace record | |
+### PP-Vehicle
+
+| ⭐ Feature | 💟 Advantages | 💡 Example |
+| ---------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
+| **License Plate-Recognition** | Both support for traditional plate and new green plate
Sample the frame in a time windows to recognice the plate license, and vots the license in many samples, which lead less compute cost and better accuracy, and the result is much more stable.
hmean of text detector: 0.979; accuracy of recognition model: 0.773
| |
+| **Vehicle Attributes** | Identify 10 vehicle colors and 9 models
More powerfull backbone: PP-HGNet/PP-LCNet, with higher accuracy and faster speed
accuracy of model: 90.81
| |
+| **Illegal Parking** | Easy to use with one line command, and define the illegal area by yourself
Get the license of illegal car
| |
+| **in-out counting** | Easy to use with one line command, and define the in-out line by yourself
Target route visualize with high tracking performance | |
+
+
## 🗳 Model Zoo
@@ -40,6 +54,7 @@ PP-Human supports various inputs such as images, single-camera, and multi-camera
| Pedestrian detection (lightweight) | 16.2ms | [Multi-object tracking](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_s_36e_pipeline.zip) | 27M |
| Pedestrian tracking (high precision) | 31.8ms | [Multi-object tracking](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip) | 182M |
| Pedestrian tracking (lightweight) | 21.0ms | [Multi-object tracking](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_s_36e_pipeline.zip) | 27M |
+| MTMCT(REID) | Single Person 1.5ms | [REID](https://bj.bcebos.com/v1/paddledet/models/pipeline/reid_model.zip) | REID:92M |
| Attribute recognition (high precision) | Single person8.5ms | [Object detection](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip)
[Attribute recognition](https://bj.bcebos.com/v1/paddledet/models/pipeline/strongbaseline_r50_30e_pa100k.zip) | Object detection:182M
Attribute recognition:86M |
| Attribute recognition (lightweight) | Single person 7.1ms | [Object detection](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip)
[Attribute recognition](https://bj.bcebos.com/v1/paddledet/models/pipeline/strongbaseline_r50_30e_pa100k.zip) | Object detection:182M
Attribute recognition:86M |
| Falling detection | Single person 10ms | [Multi-object tracking](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip)
[Keypoint detection](https://bj.bcebos.com/v1/paddledet/models/pipeline/dark_hrnet_w32_256x192.zip)
[Behavior detection based on key points](https://bj.bcebos.com/v1/paddledet/models/pipeline/STGCN.zip) | Multi-object tracking:182M
Keypoint detection:101M
Behavior detection based on key points: 21.8M |
@@ -69,40 +84,60 @@ Click to download the model, then unzip and save it in the `. /output_inference`
## 📚 Doc Tutorials
-### [A Quick Start](docs/tutorials/PPHuman_QUICK_STARTED_en.md)
+### 🚶♀️ PP-Human
+
+#### [A Quick Start](docs/tutorials/PPHuman_QUICK_STARTED_en.md)
-### Pedestrian attribute/feature recognition
+#### Pedestrian attribute/feature recognition
* [A quick start](docs/tutorials/pphuman_attribute_en.md)
+
* [Customized development tutorials](../../docs/advanced_tutorials/customization/pphuman_attribute_en.md)
- * Data Preparation
- * Model Optimization
- * New Attributes
-### Behavior detection
+#### Behavior detection
* [A quick start](docs/tutorials/pphuman_action_en.md)
- * Falling detection
- * Fighting detection
+
* [Customized development tutorials](../../docs/advanced_tutorials/customization/action_recognotion/README_en.md)
- * Solution Selection
- * Data Preparation
- * Model Optimization
- * New Attributes
-### ReID
+#### ReID
* [A quick start](docs/tutorials/pphuman_mtmct_en.md)
+
* [Customized development tutorials](../../docs/advanced_tutorials/customization/pphuman_mtmct_en.md)
- * Data Preparation
- * Model Optimization
-### Pedestrian tracking, visitor traffic statistics, trace records
+#### Pedestrian tracking, visitor traffic statistics, trace records
* [A quick start](docs/tutorials/pphuman_mot_en.md)
- * Pedestrian tracking,
- * Visitor traffic statistics
- * Regional intrusion diagnosis and counting
+
* [Customized development tutorials](../../docs/advanced_tutorials/customization/pphuman_mot_en.md)
- * Data Preparation
- * Model Optimization
+
+
+### 🚘 PP-Vehicle
+
+#### [A Quick Start](docs/tutorials/PPVehicle_QUICK_STARTED.md)
+
+#### Vehicle Plate License
+
+- [A quick start](docs/tutorials/ppvehicle_plate_en.md)
+
+- [Customized development tutorials](../../docs/advanced_tutorials/customization/ppvehicle_plate.md)
+
+#### Vehicle Attributes
+
+- [A quick start](docs/tutorials/ppvehicle_attribute_en.md)
+
+- [Customized development tutorials](../../docs/advanced_tutorials/customization/ppvehicle_attribute_en.md)
+
+#### Illegal Parking
+
+- [A quick start](docs/tutorials/ppvehicle_illegal_parking_en.md)
+
+- [Customized development tutorials](../../docs/advanced_tutorials/customization/pphuman_mot_en.md)
+
+#### Vehicle Tracking/in-out counint/Route Visualize
+
+- [A quick start](docs/tutorials/ppvehicle_mot_en.md)
+
+- [Customized development tutorials](../../docs/advanced_tutorials/customization/pphuman_mot_en.md)
+
diff --git a/deploy/pipeline/docs/tutorials/PPHuman_QUICK_STARTED.md b/deploy/pipeline/docs/tutorials/PPHuman_QUICK_STARTED.md
index ca8d6584ecbd49d8cbc82bd442af9eff438095e4..5628029869f03ff395befa61f9ce072ff6c40c9c 100644
--- a/deploy/pipeline/docs/tutorials/PPHuman_QUICK_STARTED.md
+++ b/deploy/pipeline/docs/tutorials/PPHuman_QUICK_STARTED.md
@@ -51,6 +51,7 @@ PP-Human提供了目标检测、属性识别、行为识别、ReID预训练模
| 行人检测(轻量级) | 16.2ms | [多目标跟踪](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_s_36e_pipeline.zip) | 27M |
| 行人跟踪(高精度) | 31.8ms | [多目标跟踪](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip) | 182M |
| 行人跟踪(轻量级) | 21.0ms | [多目标跟踪](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_s_36e_pipeline.zip) | 27M |
+| 跨镜跟踪(REID) | 单人1.5ms | [REID](https://bj.bcebos.com/v1/paddledet/models/pipeline/reid_model.zip) | REID:92M |
| 属性识别(高精度) | 单人8.5ms | [目标检测](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip)
[属性识别](https://bj.bcebos.com/v1/paddledet/models/pipeline/PPHGNet_small_person_attribute_954_infer.zip) | 目标检测:182M
属性识别:86M |
| 属性识别(轻量级) | 单人7.1ms | [目标检测](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip)
[属性识别](https://bj.bcebos.com/v1/paddledet/models/pipeline/PPLCNet_x1_0_person_attribute_945_infer.zip) | 目标检测:182M
属性识别:86M |
| 摔倒识别 | 单人10ms | [多目标跟踪](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip)
[关键点检测](https://bj.bcebos.com/v1/paddledet/models/pipeline/dark_hrnet_w32_256x192.zip)
[基于关键点行为识别](https://bj.bcebos.com/v1/paddledet/models/pipeline/STGCN.zip) | 多目标跟踪:182M
关键点检测:101M
基于关键点行为识别:21.8M |
diff --git a/deploy/pipeline/docs/tutorials/PPHuman_QUICK_STARTED_en.md b/deploy/pipeline/docs/tutorials/PPHuman_QUICK_STARTED_en.md
index 1a3d933bf1642edbb46f94c25243bb29ab85ea05..8250f2341e09a6540eb1ebba6f1360b734db8c64 100644
--- a/deploy/pipeline/docs/tutorials/PPHuman_QUICK_STARTED_en.md
+++ b/deploy/pipeline/docs/tutorials/PPHuman_QUICK_STARTED_en.md
@@ -51,6 +51,7 @@ PP-Human provides object detection, attribute recognition, behaviour recognition
| Pedestrian Detection (Lightweight) | 16.2ms | [Multi-Object Tracking](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_s_36e_pipeline.zip) | 27M |
| Pedestrian Tracking (high precision) | 31.8ms | [Multi-Object Tracking](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip) | 182M |
| Pedestrian Tracking (Lightweight) | 21.0ms | [Multi-Object Tracking](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_s_36e_pipeline.zip) | 27M |
+| MTMCT(REID) | Single Person 1.5ms | [REID](https://bj.bcebos.com/v1/paddledet/models/pipeline/reid_model.zip) | REID:92M |
| Attribute Recognition (high precision) | Single Person 8.5ms | [Object Detection](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip)
[Attribute Recognition](https://bj.bcebos.com/v1/paddledet/models/pipeline/PPHGNet_small_person_attribute_954_infer.zip) | Object Detection:182M
Attribute Recogniton:86M |
| Attribute Recognition (Lightweight) | Single Person 7.1ms | [Object Detection](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip)
[Attribute Recogniton](https://bj.bcebos.com/v1/paddledet/models/pipeline/PPLCNet_x1_0_person_attribute_945_infer.zip) | Object Detection:182M
Attribute Recogniton:86M |
| Falling Detection | Single Person 10ms | [Multi-Object Tracking](https://bj.bcebos.com/v1/paddledet/models/pipeline/mot_ppyoloe_l_36e_pipeline.zip)
[Keypoint Detection](https://bj.bcebos.com/v1/paddledet/models/pipeline/dark_hrnet_w32_256x192.zip)
[Skeleton Based Action Recognition](https://bj.bcebos.com/v1/paddledet/models/pipeline/STGCN.zip) | Multi-Object Tracking:182M
Keypoint Detection:101M
Skeleton Based Action Recognition:21.8M |
diff --git a/deploy/pipeline/docs/tutorials/PPVehicle_QUICK_STARTED.md b/deploy/pipeline/docs/tutorials/PPVehicle_QUICK_STARTED.md
index bb34ed56ce6e45b2316985995282667e0cf8c92a..8b140d4729d902052d751d525417981157a48f38 100644
--- a/deploy/pipeline/docs/tutorials/PPVehicle_QUICK_STARTED.md
+++ b/deploy/pipeline/docs/tutorials/PPVehicle_QUICK_STARTED.md
@@ -19,7 +19,7 @@
## 环境准备
-环境要求: PaddleDetection版本 >= release/2.4 或 develop版本
+环境要求: PaddleDetection版本 >= release/2.5 或 develop版本
PaddlePaddle和PaddleDetection安装
@@ -75,7 +75,7 @@ PP-Vehicle相关配置位于```deploy/pipeline/config/infer_cfg_ppvehicle.yml```
|-------|-------|----------|-----|
| 图片 | 属性识别 | 目标检测 属性识别 | DET ATTR |
| 单镜头视频 | 属性识别 | 多目标跟踪 属性识别 | MOT ATTR |
-| 单镜头视频 | 属性识别 | 多目标跟踪 属性识别 | MOT VEHICLEPLATE |
+| 单镜头视频 | 车牌识别 | 多目标跟踪 车牌识别 | MOT VEHICLEPLATE |
例如基于视频输入的属性识别,任务类型包含多目标跟踪和属性识别,具体配置如下:
diff --git a/deploy/pipeline/docs/tutorials/PPVehicle_QUICK_STARTED_en.md b/deploy/pipeline/docs/tutorials/PPVehicle_QUICK_STARTED_en.md
index be570cafe3f2d606bd3c97a699030a8a6d2971bd..ec720212b309dd2653c54ded7c98d6936d0cb95a 100644
--- a/deploy/pipeline/docs/tutorials/PPVehicle_QUICK_STARTED_en.md
+++ b/deploy/pipeline/docs/tutorials/PPVehicle_QUICK_STARTED_en.md
@@ -18,7 +18,7 @@ English | [简体中文](PPVehicle_QUICK_STARTED.md)
## Environment Preparation
-Environment Preparation: PaddleDetection version >= release/2.4 or release/2.5
+Environment Preparation: PaddleDetection version >= release/2.5 or develop
Installation of PaddlePaddle and PaddleDetection
@@ -73,7 +73,7 @@ The features and corresponding task types are as follows.
| ------------------- | --------------------- | ------------------------------------------- | ---------------- |
| Image | Attribute Recognition | Object Detection Attribute Recognition | DET ATTR |
| Single-camera video | Attribute Recognition | Multi-Object Tracking Attribute Recognition | MOT ATTR |
-| Single-camera video | Attribute Recognition | Multi-Object Tracking Attribute Recognition | MOT VEHICLEPLATE |
+| Single-camera video | License-plate Recognition | Multi-Object Tracking License-plate Recognition | MOT VEHICLEPLATE |
Take attribute recognition based on video input as an example: Its task type includes multi-object tracking and attributes recognition. The specific configuration is as follows.
diff --git a/deploy/pipeline/pipeline.py b/deploy/pipeline/pipeline.py
index b3e7892aaf41ba6fbec183aaa920767518e1206f..e13afeb0a28aee77ca2ad190b17dee19dea0d478 100644
--- a/deploy/pipeline/pipeline.py
+++ b/deploy/pipeline/pipeline.py
@@ -473,7 +473,9 @@ class PipePredictor(object):
def set_file_name(self, path):
if path is not None:
- self.file_name = os.path.split(path)[-1].split(".")[-2]
+ self.file_name = os.path.split(path)[-1]
+ if "." in self.file_name:
+ self.file_name = self.file_name.split(".")[-2]
else:
# use camera id
self.file_name = None
diff --git a/ppdet/engine/trainer.py b/ppdet/engine/trainer.py
index 2ce783c5a3576d2047a33d250a56c8437bf360eb..f720d84773544f23c29a3ab5fbff9aa4dfb0e3ae 100644
--- a/ppdet/engine/trainer.py
+++ b/ppdet/engine/trainer.py
@@ -538,7 +538,7 @@ class Trainer(object):
if self.cfg.get('unstructured_prune'):
self.pruner.update_params()
- is_snapshot = (self._nranks < 2 or self._local_rank == 0) \
+ is_snapshot = (self._nranks < 2 or (self._local_rank == 0 or self.cfg.metric == "Pose3DEval")) \
and ((epoch_id + 1) % self.cfg.snapshot_epoch == 0 or epoch_id == self.end_epoch - 1)
if is_snapshot and self.use_ema:
# apply ema weight on model
@@ -548,7 +548,7 @@ class Trainer(object):
self._compose_callback.on_epoch_end(self.status)
- if validate:
+ if validate and is_snapshot:
if not hasattr(self, '_eval_loader'):
# build evaluation dataset and loader
self._eval_dataset = self.cfg.EvalDataset