मैं टेन्सफोर्लो के ऑब्जेक्ट डिटेक्शन एपीआई की भी तलाश कर रहा हूं। विशेष रूप से मैं लोगों के पहचान के लिए झूठी सकारात्मकताओं को खत्म करने के लिए मौजूदा मॉडल को ठीक-ठीक करने की कोशिश कर रहा हूं। Training Region-based Object Detectors with Online Hard Example Mining
सेक्शन 3.1 में वे एक अग्रभूमि और पृष्ठभूमि वर्ग का उपयोग कर का वर्णन:
पृष्ठभूमि ROI को
निम्नलिखित कागज एक ही उद्देश्य आप का वर्णन के लिए कड़ी मेहनत नकारात्मक खनन वर्णन करता है। एक क्षेत्र पृष्ठभूमि (बीजी) लेबल किया गया है यदि इसकी अधिकतम ग्राउंड सच्चाई के साथ आईओयू अंतराल [बीजी लो, 0.5) में है। कम बीजी लो = 0.1 दोनों का थ्रेसहोल्ड एफआरसीएन और एसपीपीनेट दोनों द्वारा उपयोग किया जाता है, और [14] में अनुमानित कठोर नकारात्मक खनन का अनुमान लगाने के लिए अनुमानित है; धारणा यह है कि जमीन सत्य के साथ कुछ ओवरलैप वाले क्षेत्र भ्रमित या कठिन होने की अधिक संभावना है। हम धारा 5.4 में दिखाते हैं कि यद्यपि यह ह्युरिस्टिक अभिसरण और पहचान सटीकता में मदद करता है, यह उप-शीर्ष है क्योंकि यह कुछ कम, लेकिन महत्वपूर्ण, कठिन पृष्ठभूमि क्षेत्रों को अनदेखा करता है। हमारी विधि बीजी लो थ्रेसहोल्ड को हटा देती है।
वास्तव में इस पत्र संदर्भित है और उसके विचारों कठिन खनन के लिए Tensorflow की वस्तु का पता लगाने losses.py कोड में उपयोग किया जाता है:
class HardExampleMiner(object):
"""Hard example mining for regions in a list of images.
Implements hard example mining to select a subset of regions to be
back-propagated. For each image, selects the regions with highest losses,
subject to the condition that a newly selected region cannot have
an IOU > iou_threshold with any of the previously selected regions.
This can be achieved by re-using a greedy non-maximum suppression algorithm.
A constraint on the number of negatives mined per positive region can also be
enforced.
Reference papers: "Training Region-based Object Detectors with Online
Hard Example Mining" (CVPR 2016) by Srivastava et al., and
"SSD: Single Shot MultiBox Detector" (ECCV 2016) by Liu et al.
"""
अपने मॉडल कॉन्फ़िग फ़ाइल के आधार पर, HardMinerObject losses_builder द्वारा दिया जाता है।कोड के इस बिट में पाई:
def build_hard_example_miner(config,
classification_weight,
localization_weight):
"""Builds hard example miner based on the config.
Args:
config: A losses_pb2.HardExampleMiner object.
classification_weight: Classification loss weight.
localization_weight: Localization loss weight.
Returns:
Hard example miner.
"""
loss_type = None
if config.loss_type == losses_pb2.HardExampleMiner.BOTH:
loss_type = 'both'
if config.loss_type == losses_pb2.HardExampleMiner.CLASSIFICATION:
loss_type = 'cls'
if config.loss_type == losses_pb2.HardExampleMiner.LOCALIZATION:
loss_type = 'loc'
max_negatives_per_positive = None
num_hard_examples = None
if config.max_negatives_per_positive > 0:
max_negatives_per_positive = config.max_negatives_per_positive
if config.num_hard_examples > 0:
num_hard_examples = config.num_hard_examples
hard_example_miner = losses.HardExampleMiner(
num_hard_examples=num_hard_examples,
iou_threshold=config.iou_threshold,
loss_type=loss_type,
cls_loss_weight=classification_weight,
loc_loss_weight=localization_weight,
max_negatives_per_positive=max_negatives_per_positive,
min_negatives_per_image=config.min_negatives_per_image)
return hard_example_miner
जो model_builder.py द्वारा वापस किया गया है और train.py द्वारा बुलाया गया है। तो मूल रूप से, ऐसा लगता है कि बस आपके सच्चे सकारात्मक लेबल (लेबलआईएमजी या रेक्ट लेबल जैसे टूल के साथ) उत्पन्न करना ट्रेन एल्गोरिदम के लिए एक ही छवियों के भीतर कठिन नकारात्मक खोजने के लिए पर्याप्त होना चाहिए। संबंधित प्रश्न एक उत्कृष्ट walkthrough देता है। मैंने खुद को नकारात्मक बनाने के लिए किसी और को नहीं देखा है।
घटना आप कोई सच सकारात्मक (अर्थात कुछ भी नहीं छवि में वर्गीकृत किया जाना चाहिए) है कि डेटा में खिलाने के लिए चाहते हैं, मैं वास्तव में नहीं जानता कि और मुझे आशा है कि किसी और में झंकार कर सकते है कि क्या यह भी आवश्यक है। पास्कल वीओसी ने "अन्य" लेबल, आईडी 0 का उल्लेख किया है, जो विचलन करने वालों को लेबल करने के लिए काम कर सकता है, लेकिन मैंने 0 या तो लेबल के रूप में कोई भी खाने की कोशिश नहीं की है।
कृपया आपके द्वारा प्राप्त किए गए किसी भी परिणाम या अपडेट की गई किसी भी नई जानकारी के साथ अपडेट करें। धन्यवाद!