when generating detection folder, the num specify the number of files in training data instead of in detection folder