1. A defect inspection device comprising: an illumination optical system for illuminating a sample with light; a detection optical system for detecting scattered light from the sample illuminated by the illumination optical system; and a processing unit configured to detect a defect on the basis of the scattered light detected by the detection optical system, wherein the processing unit includes: a defect feature quantity calculation unit configured to calculate a feature quantity of each defect candidate extracted on the basis of the scattered light detected by the detection optical system; a defect candidate grouping unit configured to perform grouping of the defect candidates on the basis of the feature quantity calculated by the detect feature quantity calculation unit; a defect classification evaluation value calculation unit configured to calculate a defect classification evaluation value of the defect candidate on the basis of a feature quantity selected from the feature quantity calculated by the defect feature quantity calculation unit; a defect classification evaluation value updating unit configured to update the defect classification evaluation value calculated by the defect classification evaluation value calculation unit by teaching a defect candidate which is selected from the defect candidates based on a first classification boundary which is a threshold for classify the defect candidates; a defect classification threshold determination unit configured to determine, on the basis of the defect classification evaluation value updated by the defect classification evaluation value updating unit, a second classification boundary as a threshold for classification of the defect candidates into defect types; and a defect detection unit configured to detect a defect using the second classification boundary determined by the defect classification threshold determination unit; wherein the defect feature quantity calculation unit, the defect candidate grouping unit, the defect classification evaluation value calculation unit, the defect classification evaluation value updating unit, the defect classification threshold determination unit and the defect detention unit are effected by a hardware processor.