In open set recognition, a classifier must label instances of known classes while detecting instances of unknown classes not encountered during training. To detect unknown classes while still generalizing to new instances of existing classes, this thesis introduces a dataset augmentation technique called counterfactual image generation. This approach, based on generative adversarial networks, generates synthetic examples that are close to training set examples yet do not belong to any training category. By augmenting the training data with examples generated by this optimization, we can reformulate open set recognition as classification with one additional class: a class consisting of set of novel and unknown examples. This approach outperforms existing open set recognition algorithms on a selection of image classification tasks.