Comments (1)
從attack_utils.patch_utils導入extract_roi,evaluate_vanishing_patch,evaluate_mislabeling_patch 從dataset_utils.preprocessing導入letterbox_image_padded 從models.yolov3導入YOLOv3_Darknet53 從misc_utils.visualization導入visible_detections 從tensorflow.keras導入後端作為K 從tqdm導入tqdm 從PIL導入圖像 導入numpy作為np 導入日期時間 導入 os K.clear_session()
weights = 'model_weights/YOLOv3_Darknet53.h5' # TODO:將此路徑更改為受害者模型的權重 #weights = '/research/projects/robust-object-detection/model_weights/YOLOv3_VOC0712_Darknet53.h5' # TODO:將此路徑更改為受害者模型的權重
檢測器= YOLOv3_Darknet53(權重=權重)
警告:tensorflow:
以下變量用於 Lambda 層的調用 (tf.nn.volving),但
不存在於其跟踪對像中:
<tf.Variable 'conv2d/kernel:0' shape=(3, 3, 3, 32) dtype=float32>
這可能是有意的行為,但更可能是
遺漏。這強烈表明該層應被
制定為子類層而不是 Lambda 層。
警告:tensorflow:
以下變量用於 Lambda 層的調用 (tf.compat.v1.nn.fused_batch_norm),但
不存在於其跟踪對像中:
<tf.Variable 'batch_normalization/gamma:0' shape=(32, ) dtype=float32>
<tf.Variable 'batch_normalization/beta:0' shape=(32,
這可能是有意的行為,但更有可能是
疏忽。這強烈表明該層應被
制定為子類層而不是 Lambda 層。
警告:tensorflow:
以下變量用於 Lambda 層的調用 (tf.nn.convolution_1),但
不存在於其跟踪對像中:
<tf.Variable 'conv2d_1/kernel:0' shape=(3, 3, 32, 64) dtype=float32>
這可能是有意的行為,但更可能是
遺漏。這強烈表明該層應被
制定為子類層而不是 Lambda 層。
警告:張量流:
以下變量用於 Lambda 層的調用 (tf.compat.v1.nn.fused_batch_norm_1),但
不存在於其跟踪對像中:
...
<tf.Variable 'batch_normalization_58/beta:0' shape=(256,) dtype=float32>
這可能是有意的行為,但更可能是
疏忽。這強烈表明該層應被
制定為子類層而不是 Lambda 層。
輸出被截斷。作為可滾動元素查看或在文本編輯器中打開。調整單元格輸出設置...
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:列表索引超出範圍
from tog.
Related Issues (20)
- yolov5 HOT 1
- Video Example HOT 1
- 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]. HOT 7
- running the projects on colab HOT 2
- TOG Mislabelling attack not working with some images HOT 3
- No Object Detection Metrics Computation HOT 1
- vanishing attack and fabrication Attack HOT 1
- patch HOT 1
- visualize results HOT 1
- get mAP HOT 1
- TOG patch and position HOT 1
- Dont have from model.bbox_transform and net.vgg HOT 1
- too many wrong outcomes HOT 4
- ZeroDivisionError: division by zero
- don't have .h5 file HOT 1
- Getting Shape related Issue while loading the weight file in yolov3.
- 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]. HOT 1
- Retrieval of attacked images
- Can you give the code for the video real time attack?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tog.