Skip to content

Commit

Permalink
Adjusting comments on sample codes
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelpadilla committed Nov 5, 2018
1 parent c00afe9 commit aeb7217
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 5 additions & 3 deletions samples/sample_1/sample_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# #
# This sample demonstrates: #
# * How to create your own bounding boxes (detections and ground truth) manually; #
# * Fill the object of the class BoundingBoxes with your bounding boxes; #
# * Ground truth bounding boxes are drawn in green and detected boxes are drawn in red; #
# * Create objects of the class BoundingBoxes with your bounding boxes; #
# * Create images with detections and ground truth; #
# #
# Developed by: Rafael Padilla ([email protected]) #
Expand All @@ -11,12 +12,13 @@
# Last modification: May 24th 2018 #
###########################################################################################

import os

import _init_paths
import cv2
import os
from utils import *
from BoundingBox import BoundingBox
from BoundingBoxes import BoundingBoxes
from utils import *

###########################
# Defining bounding boxes #
Expand Down
7 changes: 3 additions & 4 deletions samples/sample_2/sample_2.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
###########################################################################################
# #
# This sample shows how to evaluate object detections applying the following metrics: #
# * Precision x Recall curve ----> used by VOC PASCAL 2012) #
# * Average Precision (AP) ----> used by VOC PASCAL 2012) #
# * Precision x Recall curve ----> used by VOC PASCAL 2012 #
# * Average Precision (AP) ----> used by VOC PASCAL 2012 #
# #
# Developed by: Rafael Padilla ([email protected]) #
# SMT - Signal Multimedia and Telecommunications Lab #
Expand Down Expand Up @@ -136,12 +136,11 @@ def createImages(dictGroundTruth, dictDetected):
##############################################################
# Plot Precision x Recall curve
evaluator.PlotPrecisionRecallCurve(
'object', # Class to show
boundingboxes, # Object containing all bounding boxes (ground truths and detections)
IOUThreshold=0.3, # IOU threshold
method=MethodAveragePrecision.EveryPointInterpolation, # As the official matlab code
showAP=True, # Show Average Precision in the title of the plot
showInterpolatedPrecision=True) # Don't plot the interpolated precision curve
showInterpolatedPrecision=True) # Plot the interpolated precision curve
# Get metrics with PASCAL VOC metrics
metricsPerClass = evaluator.GetPascalVOCMetrics(
boundingboxes, # Object containing all bounding boxes (ground truths and detections)
Expand Down

0 comments on commit aeb7217

Please sign in to comment.