Summary
This chapter provides code and visualizations to explain how Detectron2 preprocesses its inputs. In addition, it provides code to analyze the ground-truth bounding boxes and uses a genetic algorithm to select suitable values for the anchor settings (anchor sizes and ratios). Additionally, it explains the steps to produce the input pixels’ means and standard deviations from the training dataset in a running (per batch) manner when the training dataset is large and does not fit in memory at once. Finally, this chapter also puts the configurations derived in the previous chapter and this chapter into training. The results indicate that with a few modifications, the accuracy improves without impacting training or inferencing time. The next chapter utilizes these training configurations and the image augmentation techniques (introduced next) and fine-tunes the Detectron2 model for predicting brain tumors.