-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self-adversarial training - data augmentation #5117
Comments
@WongKinYiu You can try to train some small model f.e. |
@AlexeyAB OK, i will also add this into ablation study waiting list. |
@WongKinYiu I improved Self-adversarial training in the latest code: 4f62a01 So use the latest code |
@AlexeyAB OK, i will retrain the model. |
@WongKinYiu What model do you train? |
@AlexeyAB yolov3-tiny-prn. |
@WongKinYiu Sorry, another one fix ) 9a23447 Is training of CSResNext/Darknet + PANet + MISH currently in progress? |
@AlexeyAB |
Is it CSResNext-Panet or Darknet-PANet? |
|
@WongKinYiu Thanks!
|
|
So at the moment it is unclear whether such features as CBN, Dropblock and Adversarial-training improve accuracy:
|
|
It's just that most Pytorch models have accuracy that is noticeably lower than in Darknet, based on these tables:
I think these are the last 2 models that we can train on Darknet before reproduce them back on Pytorch:
Then we can use Darknet just for low-level optimizations xnor-models/..., or for new-recurrent-layers (changed gru/lstm/... layers), ... |
I will modify some code of ultralytics and examine the performance. OK, will do these experiments as soon as possible. |
@WongKinYiu Hi, Why did you use I think Mish can get better accuracy. When you will train |
OK, thanks. |
@WongKinYiu Also I added
|
@WongKinYiu Hi, Have you finished training yolov3-tiny-prn model with |
will finish training in 10 min, currently the ap50 of val data is 30.22% update: update: |
@WongKinYiu Thanks. So Self-adversarial training decreases ~ -3% AP50, at least for the small model. Have you checked the CBN again on the small model like Tiny-PRN? |
@WongKinYiu Can you share cfg and weights file of yolov3-tiny-prn with Self-adversarial? |
I can see some noise on the left cat. Could you please explain the difference between these two cats? What does the not atttacked image look like? |
A non-attacked image looks without any noise. |
The captions for the drawings were mixed up, I fixed it) |
@AlexeyAB Did you use |
How can i visualise SAT while training? |
Set in cfg-file
|
@AlexeyAB |
In the first forward-backward pass, will the network try to add objects when there is no objects in the image? |
@yelantf So in general, it is a good idea - try to add objects to the image randomly (the number and size of objects - through configurable parameters). |
Hi all, so use this mechanism to train will improve the model's accuracy or some other advantages? |
I added Self-adversarial training.
How to use:
Note for Classifier: it seems it makes training unstable for high learning rate, so you should train 50 of iteratios the model as usual, then add
adversarial_lr=0.05
and continue training.Explanation: If we run attention-algorithm or adversarial-attack-algorithm, then we find that network looks only at rare areas of the object, since it considers them to be the most important, but often the network makes mistakes - these parts of the object are not the most important or do not belong to the object at all, and the network does not notice other details of the object.
Our goal: to make the network take into account a large area
A way to achieve the goal: during training, for every second iteration, the network conducts an Adversarial attack on itself:
For example: default yolov3.cfg/weights
[net] adversarial_lr=0.05 attention=1
the network sees dog/bicycle/car[net] adversarial_lr=0.05 attention=1
(image from the first column) the network sees cat here, without dog/bicycle/carAs you can see in the edited image (adversarial attack) in the 1st/3d column, the network doesn't pay attention on dog/bicycle/car, because network thinks that that there are no dog/bicycle/car, and there is a cat instead of a dog. So network should be trained on this augmented image to pay attention to the more obvious details, as here you can clearly see the dog/bicycle/car.
Train https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov3-tiny_3l.cfg on this small dataset for 10000 iterations: #3114 (comment)
[net] adversarial_lr=0.05
The text was updated successfully, but these errors were encountered: