Giter VIP home page Giter VIP logo

git-disl / tog Goto Github PK

View Code? Open in Web Editor NEW
117.0 5.0 41.0 60.43 MB

Real-time object detection is one of the key applications of deep neural networks (DNNs) for real-world mission-critical systems. While DNN-powered object detection systems celebrate many life-enriching opportunities, they also open doors for misuse and abuse. This project presents a suite of adversarial objectness gradient attacks, coined as TOG, which can cause the state-of-the-art deep object detection networks to suffer from untargeted random attacks or even targeted attacks with three types of specificity: (1) object-vanishing, (2) object-fabrication, and (3) object-mislabeling. Apart from tailoring an adversarial perturbation for each input image, we further demonstrate TOG as a universal attack, which trains a single adversarial perturbation that can be generalized to effectively craft an unseen input with a negligible attack time cost. Also, we apply TOG as an adversarial patch attack, a form of physical attacks, showing its ability to optimize a visually confined patch filled with malicious patterns, deceiving well-trained object detectors to misbehave purposefully.

Jupyter Notebook 95.21% Python 4.28% Shell 0.09% Roff 0.01% MATLAB 0.02% C 0.22% Cuda 0.16% Cython 0.01%
adversarial-attacks object-detection yolov3 ssd faster-rcnn

tog's Introduction

TOG: Adversarial Objectness Gradient Attacks in Real-time Object Detection Systems

Real-time object detection is one of the key applications of deep neural networks (DNNs) for real-world mission-critical systems. While DNN-powered object detection systems celebrate many life-enriching opportunities, they also open doors for misuse and abuse. This project presents a suite of adversarial objectness gradient attacks, coined as TOG, which can cause the state-of-the-art deep object detection networks to suffer from untargeted random attacks or even targeted attacks with three types of specificity: (1) object-vanishing, (2) object-fabrication, and (3) object-mislabeling. Apart from tailoring an adversarial perturbation for each input image, we further demonstrate TOG as a universal attack, which trains a single adversarial perturbation that can be generalized to effectively craft an unseen input with a negligible attack time cost. Also, we apply TOG as an adversarial patch attack, a form of physical attacks, showing its ability to optimize a visually confined patch filled with malicious patterns, deceiving well-trained object detectors to misbehave purposefully.

No Attack TOG-vanishing TOG-fabrication TOG-mislabeling

This repository contains the source code for the following papers in our lab:

  • Ka-Ho Chow, Ling Liu, Margaret Loper, Juhyun Bae, Mehmet Emre Gursoy, Stacey Truex, Wenqi Wei, and Yanzhao Wu. "Adversarial Objectness Gradient Attacks in Real-time Object Detection Systems." In IEEE International Conference on Trust, Privacy and Security in Intelligent Systems, and Applications, 2020. [PDF] [Talk]
  • Ka-Ho Chow, Ling Liu, Mehmet Emre Gursoy, Stacey Truex, Wenqi Wei, and Yanzhao Wu. "Understanding Object Detection Through an Adversarial Lens." In European Symposium on Research in Computer Security, pp. 460-481. Springer, 2020. [PDF] [Talk]

Installation and Dependencies

This project runs on Python 3.6. You are highly recommended to create a virtual environment to make sure the dependencies do not interfere with your current programming environment. By default, GPUs will be used to accelerate the process of adversarial attacks.

To create a virtual environment, run the following command in terminal:

python3 -m venv venv
source venv/bin/activate

To install related packages, run the following command in terminal:

pip install --upgrade pip
pip install -r requirements.txt

Instruction

TOG attacks support both one-phase and two-phase object detectors. In this repository, we include five object detectors trained on the VOC dataset. We prepare a Jupyter notebook for each victim detector to demonstrate the TOG attacks. Pretrained weights are available for download, and the links are provided in the corresponding notebook.

  • TOG-untargeted, TOG-vanishing, TOG-fabrication, and TOG-mislabeling
  • TOG-patch: [link]
  • TOG-universal: [link] - Pretrained universal perturbations (both vanishing and fabrication) for all supported models are available [here].

Status

We are continuing the development and there is ongoing work in our lab regarding adversarial attacks and defenses on object detection. If you would like to contribute to this project, please contact Ka-Ho Chow.

The code is provided as is, without warranty or support. If you use our code, please cite:

@inproceedings{chow2020adversarial,
  title={Adversarial Objectness Gradient Attacks in Real-time Object Detection Systems},
  author={Chow, Ka-Ho and Liu, Ling and Loper, Margaret and Bae, Juhyun and Emre Gursoy, Mehmet and Truex, Stacey and Wei, Wenqi and Wu, Yanzhao},
  booktitle={IEEE International Conference on Trust, Privacy and Security in Intelligent Systems, and Applications},
  pages={263--272},
  year={2020},
  organization={IEEE}
}
@inproceedings{chow2020understanding,
  title={Understanding Object Detection Through an Adversarial Lens},
  author={Chow, Ka-Ho and Liu, Ling and Gursoy, Mehmet Emre and Truex, Stacey and Wei, Wenqi and Wu, Yanzhao},
  booktitle={European Symposium on Research in Computer Security},
  pages={460--481},
  year={2020},
  organization={Springer}
}

Our lab also investigates robust object detection against adversarial attacks, you can refer to:

@inproceedings{chow2021robust,
  title={Robust Object Detection Fusion Against Deception},
  author={Chow, Ka-Ho and Liu, Ling},
  booktitle={ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
  year={2021},
  organization={ACM}
}
@inproceedings{chow2022boosting,
  title={Boosting Object Detection Ensembles with Error Diversity},
  author={Chow, Ka-Ho and Liu, Ling},
  booktitle={IEEE International Conference on Data Mining},
  year={2022},
  organization={IEEE}
}

Acknowledgement

This project is developed based on the following repositories:

tog's People

Contributors

khchow-gt 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  avatar  avatar  avatar

tog's Issues

TOG Mislabelling attack not working with some images

Hi,
I used test images from the PASCAL VOC 2007 dataset to test all the attacks. However, while running for some images I found the same error as described below. PFA the zip images which give this error. Also, please find attached file (images and main code I used)

I request you to please look into the issue and resolve it at the earliest. (I tried with SSD512,but it is giving error with other models,too)

System Configuration
-> Ubuntu OS
-> Virtual env named TOG with the same requirements.txt

000983
000003

code.zip

Traceback (most recent call last):
File "demo_ssd512.py", line 127, in
x_adv_mislabeling_ml = tog_mislabeling(victim=detector, x_query=x_query, target='ml', n_iter=n_iter, eps=eps, eps_iter=eps_iter)
File "/home/user/Documents/TOG/tog/attacks.py", line 34, in tog_mislabeling
mode=target)
File "/home/user/Documents/TOG/attack_utils/target_utils.py", line 8, in generate_attack_targets
pred_logits = detections_copy[:, 2:-4]
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed_

don't have .h5 file

Dear authors:
I'm running the demo on yolov3,but I don't have YOLOv3_Darknet53.h5 file.Can you supply the file?
Thanks a lot!

visualize results

One pixel can be seen in the picture after the single pixel attack. For your experiments, regardless of the detection results, why does the images after gradient attack look the same as the original image?

Getting Shape related Issue while loading the weight file in yolov3.

Note: Going through the yolov3_darknet demo file in colab.

The error while trying to load the model file.
Note: .h5 file is downloaded from the given link in notebook only.
the error is as below!
/usr/local/lib/python3.10/dist-packages/keras/src/engine/keras_tensor.py in len(self)
244
245 def len(self):
--> 246 raise TypeError(
247 "Keras symbolic inputs/outputs do not "
248 "implement __len__. You may be "

TypeError: Exception encountered when calling layer "reshape" (type Reshape).

Keras symbolic inputs/outputs do not implement __len__. You may be trying to pass Keras symbolic inputs/outputs to a TF API that does not register dispatching, preventing Keras from automatically converting the API call to a lambda layer in the Functional Model. This error will also get raised if you try asserting a symbolic input/output directly.

Call arguments received by layer "reshape" (type Reshape):
• inputs=tf.Tensor(shape=(None, None, None, 75), dtype=float32)

image

Video Example

In the repo it is shown an example of the dash cam being attacked. Is there any example of the code that would be used to adapt it to video, or any general guidance? I work heavily with video so seeing an example would be helpful if you happen to have that code around.

Best,
Brandon

load caffe model

Hi!

I have a ssd model which is implemented by caffe, is it possible to use this custom model to replace yours in the demo?
If so, how can I do that? Thanks for your help!

No Object Detection Metrics Computation

Hi,
I have gone through the code. I found eval_tools.py in frcnn_utils which contains the metrics computation code. I was in the assumption that these metrics are computed after executing the attack, but none of the models with an attack or without an attack (Benign or Adversarial) are giving any metrics.

Can you please clarify this?
Because in the paper you have mentioned the mAP values but in the main code, it doesn't seem to be included.

If you have any updated code, please share that!!

ZeroDivisionError: division by zero

ZeroDivisionError Traceback (most recent call last)
in
69 # Compute training statistics
70 epoch_loss = float(np.mean(epoch_loss))
---> 71 ASR_TOG = score_adv / num_rois
72 ASR_Rand = score_rand / num_rois
73

ZeroDivisionError: division by zero

##############################
##############################
##############################

If some images fail to detect objects

Is this modification correct?

##############################
##############################
##############################

Compute training statistics

epoch_loss = float(np.mean(epoch_loss))
###########################################code i added
+     if num_rois > 0:
+          ASR_TOG = score_adv / num_rois
+         ASR_Rand = score_rand / num_rois
+     else:
+         ASR_TOG = 0.0
+         ASR_Rand = 0.0
    ###########################################code i added
    ASR_TOG = score_adv / num_rois
    ASR_Rand = score_rand / num_rois

too many wrong outcomes

I don't know how to solve it.I create the virtual environment as the requirements.txt.when I run,the picture is full of wrong boxes.

patch

I run the 'demo_patch.ipynb' .
I trained my own vehicle datasets and saved the npy files. Everything seems to be going well, but no patch was generated during the test as shown in the figure below.
Can you help me?

image

ERROR: ResolutionImpossible

When I am installing the dependencies, I have the error below:
**ERROR: Cannot install -r ./requirements.txt (line 12), -r ./requirements.txt (line 3), -r ./requirements.txt (line 4), -r ./requirements.txt (line 6), -r ./requirements.txt (line 8), -r ./requirements.txt (line 9) and numpy==1.19.2 because these package versions have conflicting dependencies.

The conflict is caused by:
The user requested numpy==1.19.2
cupy-cuda100 7.1.1 depends on numpy>=1.9.0
keras 2.2.4 depends on numpy>=1.9.1
matplotlib 3.3.2 depends on numpy>=1.15
scikit-image 0.17.2 depends on numpy>=1.15.1
tensorboardx 2.0 depends on numpy
tensorflow-gpu 1.15.4 depends on numpy<1.19.0 and >=1.16.0

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict**

It seems that the given version of different packages in the requirement.txt conflict, how should I fix this problem?

vanishing attack and fabrication Attack

Thank you for your great contribution!
I found that the vanishing attack function is the same as the fabric attack function, but why are the detection results after the attack really different?

ValueError: Dimension 0 in both shapes must be equal, but are 1 and 255. Shapes are [1,1,1024,75] and [255,1024,1,1]. for 'Assign_360' (op: 'Assign') with input shapes: [1,1,1024,75], [255,1024,1,1].

Hi, i am try to run my model, but it's doesn't work. somebody can help me?

File "E:\1prog\TOG-master\untargeted.py", line 13, in
detector = YOLOv3_Darknet53(weights=weights)
File "E:\1prog\TOG-master\models\yolov3.py", line 243, in init
model_img_size, confidence_thresh_default, confidence_thresh_eval)
File "E:\1prog\TOG-master\models\yolov3.py", line 21, in init
self.model.load_weights(weights)
File "E:\Anaconda3-5.2.0\envs\TOG-master\lib\site-packages\keras\engine\network.py", line 1166, in load_weights
f, self.layers, reshape=reshape)
File "E:\Anaconda3-5.2.0\envs\TOG-master\lib\site-packages\keras\engine\saving.py", line 1058, in load_weights_from_hdf5_group
K.batch_set_value(weight_value_tuples)
File "E:\Anaconda3-5.2.0\envs\TOG-master\lib\site-packages\keras\backend\tensorflow_backend.py", line 2465, in batch_set_value
assign_op = x.assign(assign_placeholder)
File "E:\Anaconda3-5.2.0\envs\TOG-master\lib\site-packages\tensorflow_core\python\ops\variables.py", line 2067, in assign
self._variable, value, use_locking=use_locking, name=name)
File "E:\Anaconda3-5.2.0\envs\TOG-master\lib\site-packages\tensorflow_core\python\ops\state_ops.py", line 227, in assign
validate_shape=validate_shape)
File "E:\Anaconda3-5.2.0\envs\TOG-master\lib\site-packages\tensorflow_core\python\ops\gen_state_ops.py", line 66, in assign
use_locking=use_locking, name=name)
File "E:\Anaconda3-5.2.0\envs\TOG-master\lib\site-packages\tensorflow_core\python\framework\op_def_library.py", line 794, in _apply_op_helper
op_def=op_def)
File "E:\Anaconda3-5.2.0\envs\TOG-master\lib\site-packages\tensorflow_core\python\util\deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "E:\Anaconda3-5.2.0\envs\TOG-master\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3357, in create_op
attrs, op_def, compute_device)
File "E:\Anaconda3-5.2.0\envs\TOG-master\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3426, in _create_op_internal
op_def=op_def)
File "E:\Anaconda3-5.2.0\envs\TOG-master\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1770, in init
control_input_ops)
File "E:\Anaconda3-5.2.0\envs\TOG-master\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1610, in _create_c_op
raise ValueError(str(e))
ValueError: Dimension 0 in both shapes must be equal, but are 1 and 255. Shapes are [1,1,1024,75] and [255,1024,1,1]. for 'Assign_360' (op: 'Assign') with input shapes: [1,1,1024,75], [255,1024,1,1].

How to evaluate algorithm performance

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

yolov5

Hi, read the paper and listened to the talk, amazing work. I was trying this on different object detection libraries and the one resistant is the yolo from analytics. I wonder if you have already tried it

Is your feature request related to a problem? Please describe.
yolov5 is resistant to TOC based on yolov3 current code.

Describe the solution you'd like
would be great to be able to compute the gradient with an example file as in yolov3

Describe alternatives you've considered
increase epsilon until image is hard to label even for humans

Additional context
link to yolov5 https://github.com/ultralytics/yolov5

module 'cupy.cuda.memory' has no attribute 'PythonFunctionAllocatorMemory' for FRCNN

The bug
I tried using the FRCNN model and followed the demo .ipynb file given in the repository. But trying to import the FRCNN model gave me cupy error. It first came to be an Attirbute error for Utils ( module 'cupy' has no attribute 'util') but later started giving this error. I tried to import other models to see if it was happening in other modules too but I was able to import SSD successfully. Can't figure out what's happening here.

This is what I tried to import
from dataset_utils.preprocessing import letterbox_image_padded
from misc_utils.visualization import visualize_detections
from models.frcnn import FRCNN # <----- This is where I got the error
from PIL import Image
from tog.attacks import *
import os

If applicable, add screenshots to help explain your problem.
image
image

TypeError: Keras symbolic inputs/outputs do not implement `__len__`

Hi, I'm trying to run demo_patch notebook on google colab, but I getting this error

TypeError: Keras symbolic inputs/outputs do not implement __len__. You may be trying to pass Keras symbolic inputs/outputs to a TF API that does not register dispatching, preventing Keras from automatically converting the API call to a lambda layer in the Functional Model. This error will also get raised if you try asserting a symbolic input/output directly.

AttributeError: 'str' object has no attribute 'decode'

Hi!

I am trying to run the demo_yolov3_d and I have downloaded the YOLOv3_Darknet53.h5 from dropbox

Now when I am trying to run the code "detector = YOLOv3_Darknet53(weights=weights)",
there is an error "
AttributeError Traceback (most recent call last)
in ()
1 weights = '/home/osr/YOLOv3_Darknet53.h5' # TODO: Change this path to the victim model's weights
2
----> 3 detector = YOLOv3_Darknet53(weights=weights)

/home/osr/TOG/models/yolov3.py in init(self, weights, model_img_size, confidence_thresh_default, confidence_thresh_eval)
241 def init(self, weights, model_img_size=(416, 416), confidence_thresh_default=0.20, confidence_thresh_eval=0.01):
242 super().init(weights, yolo_darknet53,
--> 243 model_img_size, confidence_thresh_default, confidence_thresh_eval)
244
245

/home/osr/TOG/models/yolov3.py in init(self, weights, backbone, model_img_size, confidence_thresh_default, confidence_thresh_eval)
19
20 self.model = backbone(Input(shape=(None, None, 3)), self.num_anchors // 3, self.num_classes)
---> 21 self.model.load_weights(weights)
22
23 self.encoded_detections = [tf.placeholder(dtype=tf.float32,

/home/osr/anaconda3/envs/TOG/lib/python3.6/site-packages/keras/engine/network.py in load_weights(self, filepath, by_name, skip_mismatch, reshape)
1164 else:
1165 saving.load_weights_from_hdf5_group(
-> 1166 f, self.layers, reshape=reshape)
1167
1168 def _updated_config(self):

/home/osr/anaconda3/envs/TOG/lib/python3.6/site-packages/keras/engine/saving.py in load_weights_from_hdf5_group(f, layers, reshape)
1002 """
1003 if 'keras_version' in f.attrs:
-> 1004 original_keras_version = f.attrs['keras_version'].decode('utf8')
1005 else:
1006 original_keras_version = '1'

AttributeError: 'str' object has no attribute 'decode' "

I have modifited the path of weights file to my path and I wonder how to fix this TAT

Thanks for helping

get mAP

I have trained the yolov3 model with my own dataset. I want to get the mAP before and after the attack.
I saw in your paper that you also recorded the mAP before and after the attack, but I don't know how you implemented it in the code?
Can you help me?

How do I solve the IndexError: list index out of range error when using tensorflow-gpu==2.5.0 for execute the demo_patch.ipynb program

from attack_utils.patch_utils import extract_roi, evaluate_vanishing_patch, evaluate_mislabeling_patch
from dataset_utils.preprocessing import letterbox_image_padded
from models.yolov3 import YOLOv3_Darknet53
from misc_utils.visualization import visualize_detections
from tensorflow.keras import backend as K
from tqdm import tqdm
from PIL import Image
import numpy as np
import datetime
import os
K.clear_session()

weights = 'model_weights/YOLOv3_Darknet53.h5' # TODO: Change this path to the victim model's weights
#weights = '/research/projects/robust-object-detection/model_weights/YOLOv3_VOC0712_Darknet53.h5' # TODO: Change this path to the victim model's weights

detector = YOLOv3_Darknet53(weights=weights)


WARNING:tensorflow:
The following Variables were used a Lambda layer's call (tf.nn.convolution), but
are not present in its tracked objects:
<tf.Variable 'conv2d/kernel:0' shape=(3, 3, 3, 32) dtype=float32>
It is possible that this is intended behavior, but it is more likely
an omission. This is a strong indication that this layer should be
formulated as a subclassed Layer rather than a Lambda layer.
WARNING:tensorflow:
The following Variables were used a Lambda layer's call (tf.compat.v1.nn.fused_batch_norm), but
are not present in its tracked objects:
<tf.Variable 'batch_normalization/gamma:0' shape=(32,) dtype=float32>
<tf.Variable 'batch_normalization/beta:0' shape=(32,) dtype=float32>
It is possible that this is intended behavior, but it is more likely
an omission. This is a strong indication that this layer should be
formulated as a subclassed Layer rather than a Lambda layer.
WARNING:tensorflow:
The following Variables were used a Lambda layer's call (tf.nn.convolution_1), but
are not present in its tracked objects:
<tf.Variable 'conv2d_1/kernel:0' shape=(3, 3, 32, 64) dtype=float32>
It is possible that this is intended behavior, but it is more likely
an omission. This is a strong indication that this layer should be
formulated as a subclassed Layer rather than a Lambda layer.
WARNING:tensorflow:
The following Variables were used a Lambda layer's call (tf.compat.v1.nn.fused_batch_norm_1), but
are not present in its tracked objects:
...
<tf.Variable 'batch_normalization_58/beta:0' shape=(256,) dtype=float32>
It is possible that this is intended behavior, but it is more likely
an omission. This is a strong indication that this layer should be
formulated as a subclassed Layer rather than a Lambda layer.
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

IndexError Traceback (most recent call last)
C:\TEMP\ipykernel_9648\2429568344.py in
2 #weights = '/research/projects/robust-object-detection/model_weights/YOLOv3_VOC0712_Darknet53.h5' # TODO: Change this path to the victim model's weights
3
----> 4 detector = YOLOv3_Darknet53(weights=weights)

c:\Users\User\Desktop\TOG\models\yolov3.py in init(self, weights, model_img_size, confidence_thresh_default, confidence_thresh_eval)
241 def init(self, weights, model_img_size=(416, 416), confidence_thresh_default=0.20, confidence_thresh_eval=0.01):
242 super().init(weights, yolo_darknet53,
--> 243 model_img_size, confidence_thresh_default, confidence_thresh_eval)
244
245

c:\Users\User\Desktop\TOG\models\yolov3.py in init(self, weights, backbone, model_img_size, confidence_thresh_default, confidence_thresh_eval)
18 self.num_anchors = len(self.anchors)
19
---> 20 self.model = backbone(Input(shape=(None, None, 3)), self.num_anchors // 3, self.num_classes)
21 self.model.load_weights(weights)
22

c:\Users\User\Desktop\TOG\yolov3_utils\model.py in yolo_darknet53(inputs, num_anchors, num_classes)
69
70 x = compose(DarknetConv2D_BN_Leaky(256, (1, 1)), UpSampling2D(2))(x)
---> 71 x = Concatenate()([x, darknet.layers[152].output])
72 x, y2 = make_last_layers(x, 256, num_anchors * (num_classes + 5))
73 y2 = Reshape((tf.shape(y2)[1], tf.shape(y2)[2], num_anchors, num_classes + 5))(y2)

IndexError: list index out of range

TOG_yolov3_utils_model.txt

Generate perturbation for arbitrarily sized images

I'm exploring a black-box attack, but the model under attack has very poor performance on the images after being rescaled and padded.

I would like to generate an adversarial perturbation without rescaling the image.

patch

I want to know how to generate a patch

Shape Related Issue while loading the model. ValueError: Dimension 0 in both shapes must be equal, but are 1 and 255. Shapes are [1,1,1024,75] and [255,1024,1,1]. for 'Assign_1082' (op: 'Assign') with input shapes: [1,1,1024,75], [255,1024,1,1].

Hi, I used the pretrained model, which is working fine. but when I am training keras-yolov3 model with following steps:
1-> converted the VOC annotations to specific format mentioned in git repository.
2-> downloading the yolov3 weight file from the official website.
3-> converting the model using given instruction, with mentioned suitable changes.
4-> Trained the model.

Now the issue is when I'm trying to load the model .h5 file, below error is coming. please help!!!
ValueError: Dimension 0 in both shapes must be equal, but are 1 and 255. Shapes are [1,1,1024,75] and [255,1024,1,1]. for 'Assign_1082' (op: 'Assign') with input shapes: [1,1,1024,75], [255,1024,1,1].

TOG patch and position

Have you ever tried to generate a single channel patch? Does the placement of the patch affect the experimental results?

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.