Giter Club home page Giter Club logo

dpatch's People

Contributors

cory8249 avatar crazylyf avatar liuziwei7 avatar longcw avatar snowmasaya avatar veralauee avatar wilrich-msft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dpatch's Issues

Train loss do not change

Thanks for your contribution, here is my problem

My training loss do not change as I followed your doc

epoch 12[1308/5011], loss: 57.624, bbox_loss: 0.469, iou_loss: 56.200, cls_loss: 0.955 (0.05 s/batch, rest:0:03:09) image_size [416 416] epoch 12[1318/5011], loss: 57.321, bbox_loss: 0.394, iou_loss: 55.970, cls_loss: 0.957 (0.05 s/batch, rest:0:03:07) image_size [416 416] epoch 12[1328/5011], loss: 57.479, bbox_loss: 0.486, iou_loss: 56.038, cls_loss: 0.954 (0.05 s/batch, rest:0:03:07) image_size [416 416] epoch 12[1338/5011], loss: 57.593, bbox_loss: 0.430, iou_loss: 56.207, cls_loss: 0.957 (0.05 s/batch, rest:0:03:07) image_size [416 416] epoch 12[1348/5011], loss: 57.506, bbox_loss: 0.407, iou_loss: 56.136, cls_loss: 0.964 (0.05 s/batch, rest:0:03:10) image_size [416 416] epoch 12[1358/5011], loss: 57.482, bbox_loss: 0.372, iou_loss: 56.158, cls_loss: 0.952 (0.05 s/batch, rest:0:03:06) image_size [416 416] epoch 12[1368/5011], loss: 57.340, bbox_loss: 0.470, iou_loss: 55.912, cls_loss: 0.957 (0.05 s/batch, rest:0:03:05) image_size [416 416] epoch 12[1378/5011], loss: 57.373, bbox_loss: 0.427, iou_loss: 56.004, cls_loss: 0.942 (0.05 s/batch, rest:0:03:03) image_size [416 416] epoch 12[1388/5011], loss: 57.423, bbox_loss: 0.447, iou_loss: 56.018, cls_loss: 0.958 (0.05 s/batch, rest:0:03:04) image_size [416 416] epoch 12[1398/5011], loss: 57.304, bbox_loss: 0.419, iou_loss: 55.932, cls_loss: 0.953 (0.05 s/batch, rest:0:03:05)

could you give me a hand? thanks a lot

mAP has hardly decreased

I have try to run train.py of the project, and run test.py of the project using the latest patch that saved by train.py (without using the untargetd_DPATCH which download from the url that given at the README.md file).
after 100 epoch, it got 0.7095 mAP, but after 9757 epoch, it still got 0.7040 mAP.
I just wander it there any parameters that I must modified before run train.py? I only modified max_epoch value in cfgs.exps.darknet19_exp1.py to run more epoch.

than you~

RuntimeError: CUDNN_STATUS_EXECUTION_FAILED

When I run demo.py or train.py or test.py ,and I am getting this error:

initial model without patch
load model succ...
Traceback (most recent call last):
File "demo.py", line 65, in
bbox_pred, iou_pred, prob_pred = net(im_data, attack=args.attack)
File "/home/lubby/anaconda3/envs/dpatch/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/media/lubby/4Tdisk/DPatch/darknet.py", line 208, in forward
conv1s = self.conv1s(im_data)
File "/home/lubby/anaconda3/envs/dpatch/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/lubby/anaconda3/envs/dpatch/lib/python2.7/site-packages/torch/nn/modules/container.py", line 91, in forward
input = module(input)
File "/home/lubby/anaconda3/envs/dpatch/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/lubby/anaconda3/envs/dpatch/lib/python2.7/site-packages/torch/nn/modules/container.py", line 91, in forward
input = module(input)
File "/home/lubby/anaconda3/envs/dpatch/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/media/lubby/4Tdisk/DPatch/utils/network.py", line 35, in forward
x = self.conv(x)
File "/home/lubby/anaconda3/envs/dpatch/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/lubby/anaconda3/envs/dpatch/lib/python2.7/site-packages/torch/nn/modules/conv.py", line 301, in forward
self.padding, self.dilation, self.groups)
RuntimeError: CUDNN_STATUS_EXECUTION_FAILED

I want to know your CUDA version.
does anyone know, what is causing this?

My environment:
systerm ubuntu 18.04
gpu: NVIDIA RTX TITAN
python : 3.6.0
cuda: 9.0
cudnn:7.5.1

How to untarget attack

The paper says that for untargeted attack, target label is defined as 0,but 0 corresponds to aeroplane,is this still a targeted attack,What should I do

The mAP is few decreased

The same question with the first issue. Can you give some details about the training process?
thank you

Trained DPatch not available

The link to download the pretrained DPatch seems to be broken. Would it be possible to provide a new link, or share the file in another way?

ModuleNotFoundError: No module named 'layers.reorg._ext.reorg_layer._reorg_layer'

run command :python demo.py
get the result:

train_output_dir /home/djy/Desktop/DPatch/models/training/darknet19_voc07trainval_exp3
--------------- patch saved in ----------------
trained_patch/1
Traceback (most recent call last):
File "demo.py", line 7, in
from darknet import Darknet19
File "/home/djy/Desktop/DPatch/darknet.py", line 9, in
from layers.reorg.reorg_layer import ReorgLayer
File "/home/djy/Desktop/DPatch/layers/reorg/reorg_layer.py", line 3, in
from ._ext import reorg_layer
File "/home/djy/Desktop/DPatch/layers/reorg/_ext/reorg_layer/init.py", line 3, in
from ._reorg_layer import lib as _lib, ffi as _ffi
ModuleNotFoundError: No module named 'layers.reorg._ext.reorg_layer._reorg_layer'

pytorch0.4.0 torchvision2.0.1

the mAP are too high

I followed this code but it seems like the Patch doesn't work, since the mAP are too high. Are there any tricks during training? I'd appreciate it if the author or anyone else could solve this problem.

inf and -inf in the trained patch

I have checked the trained untargeted-patch that the author offerd and found that there're inf and -inf in the patch. It is weird and why does 'inf' appear in the patch? Or how does the author train this patch and get this result?

Code for training seems incomplete?

For instance, it seems like the training code doesn't apply the patch at all (train.py:97 does not specify attack parameter to net).

It's also not clear whether you were intending to modify the ground truth label in the dataset, since the bboxes are unmodified. (Training-wise this does not seem to matter as the ground truth is modified in imdb.py:74 anyway.)

For context, I'm trying to reproduce the results in your paper with the default configurations in this repo (after fixing the train.py bug), but currently the fitted patch does not affect mAP very much -- similar mAP as compared to running test.py without applying any patch -- even after ~500k iterations and using a much larger patch (120x120) than the paper (20x20 to 80x80). The provided untargetd_DPATCH.npy has significantly lower mAP, but contains inf and -inf values -- it's unclear how those values surfaced given that the gradients for the patch seem generally pretty small.

So I'm guessing my training setup went wrong somehow. Any pointers for setting up the repo for training a patch would be greatly appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.