skokec / detectron-traffic-signs

Apache License 2.0
34 stars 21 forks source link

about data aug #5

Open hello7623 opened 4 years ago

hello7623 commented 4 years ago

Do you have any code for data augmentation,I'd like to study, could I ?

skokec commented 4 years ago

You can use the attached code (DataAugmentator.tar.gz), however, this code is in matlab and is based on our raw dataset images before we exported it for the public, so you can use it mostly for looking-up the details. The usage of this code and the entrypoints are below:

aug = DataAugmentator();                    
aug.collectData(srcDetailedAnnoNames, srcAnnoNames, srcImgNames);                    
aug.prepareDataDistributions(templates);

generatedSamples = aug.generateFromRealImages(selectedClasses_forGenericImgs_Fr, numTrain_instances_selectedClasses_forGenericImgs_Fr, self.outDirAnnot, self.outDirImgs, self.outDirExtractedTS, imgCounterAbsolute);

Hope this helps in any way.

Best, Domen

hello7623 commented 4 years ago

Thanks!

------------------ 原始邮件 ------------------ 发件人: "Domen Tabernik"<notifications@github.com>; 发送时间: 2020年4月28日(星期二) 晚上9:22 收件人: "skokec/detectron-traffic-signs"<detectron-traffic-signs@noreply.github.com>; 抄送: "Faker"<981839079@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [skokec/detectron-traffic-signs] about data aug (#5)

You can use the attached code (DataAugmentator.tar.gz), however, this code is in matlab and is based on our raw dataset images before we exported it for the public, so you can use it mostly for looking-up the details. The usage of this code and the entrypoints are below: aug = DataAugmentator(); aug.collectData(srcDetailedAnnoNames, srcAnnoNames, srcImgNames); aug.prepareDataDistributions(templates); generatedSamples = aug.generateFromRealImages(selectedClasses_forGenericImgs_Fr, numTrain_instances_selectedClasses_forGenericImgs_Fr, self.outDirAnnot, self.outDirImgs, self.outDirExtractedTS, imgCounterAbsolute);

Hope this helps in any way.

Best, Domen

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.