Module Name | yolov3_darknet53_venus |
---|---|
Category | object detection |
Network | YOLOv3 |
Dataset | Baidu Detection Dataset |
Fine-tuning supported or not | Yes |
Module Size | 501MB |
Latest update date | 2021-02-26 |
Data indicators | - |
-
- YOLOv3 is a one-stage detector proposed by Joseph Redmon and Ali Farhadi, which can reach comparable accuracy but twice as fast as traditional methods. This module is based on YOLOv3, trained on Baidu Vehicle Dataset which consists of 170w pictures and 1000w+ boxes, improve the accuracy on 8 test datasets for average 5.36%, and can be used for vehicle detection.
-
-
paddlepaddle >= 1.6.2
-
paddlehub >= 1.6.0 | How to install PaddleHub
-
-
-
$ hub install yolov3_darknet53_venus
- In case of any problems during installation, please refer to: Windows_Quickstart | Linux_Quickstart | Mac_Quickstart
-
-
-
def context(trainable=True, pretrained=True, get_prediction=False)
-
Extract features, and do transfer learning
-
Parameters
- trainable(bool): whether parameters trainable or not
- pretrained (bool): whether load pretrained model or not
- get_prediction (bool): whether perform prediction
-
Return
- inputs (dict): inputs, a dict, include two keys: "image" and "im_size"
- image (Variable): image variable
- im_size (Variable): image size
- outputs (dict): model output
- program for transfer learning
- inputs (dict): inputs, a dict, include two keys: "image" and "im_size"
-
-
def object_detection(paths=None, images=None, batch_size=1, use_gpu=False, score_thresh=0.5, visualization=True, output_dir='detection_result')
-
Detection API, detect positions of all objects in image
-
Parameters
- paths (list[str]): image path;
- images (list[numpy.ndarray]): image data, ndarray.shape is in the format [H, W, C], BGR;
- batch_size (int): the size of batch;
- use_gpu (bool): use GPU or not; set the CUDA_VISIBLE_DEVICES environment variable first if you are using GPU
- score_thresh (float): confidence threshold;
- visualization (bool): Whether to save the results as picture files;
- output_dir (str): save path of images;
-
Return
- res (list[dict]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
- data (list): detection results, each element in the list is dict
- confidence (float): the confidence of the result
- label (str): label
- left (int): the upper left corner x coordinate of the detection box
- top (int): the upper left corner y coordinate of the detection box
- right (int): the lower right corner x coordinate of the detection box
- bottom (int): the lower right corner y coordinate of the detection box
- save_path (str, optional): output path for saving results
- data (list): detection results, each element in the list is dict
- res (list[dict]): classication results, each element in the list is dict, key is the label name, and value is the corresponding probability
-
-
def save_inference_model(dirname, model_filename=None, params_filename=None, combined=True)
-
Save model to specific path
-
Parameters
- dirname: output dir for saving model
- model_filename: filename for saving model
- params_filename: filename for saving parameters
- combined: whether save parameters into one file
-
-
-
1.0.0
First release
-
$ hub install yolov3_darknet53_venus==1.0.0
-