TNTWEN / OpenVINO-YOLOV4

This is implementation of YOLOv4,YOLOv4-relu,YOLOv4-tiny,YOLOv4-tiny-3l,Scaled-YOLOv4 and INT8 Quantization in OpenVINO2021.3
MIT License
239 stars 66 forks source link

yolov4.json #11

Closed AlanHN closed 4 years ago

AlanHN commented 4 years ago

The id in yolov4.json is still TFYOLOV3

AlanHN commented 4 years ago

And I think maybe we should edit the masks in yolov4.json the fit the mask in darknet/cfg/yolov4-custom.cfg which is mask=0,1,2.

TNTWEN commented 4 years ago

The id in yolov4.json is still TFYOLOV3

Hello, @HaoningLan If we change TFYOLOV3 to TFYOLOV4,errors will happen when running the demo.Like this: Traceback (most recent call last): File "object_detection_demo_yolov3_async.py", line 518, in <module> sys.exit(main() or 0) File "object_detection_demo_yolov3_async.py", line 398, in main args.keep_aspect_ratio) File "object_detection_demo_yolov3_async.py", line 233, in get_objects out_blob = out_blob.buffer.reshape(net.layers[net.layers[layer_name].parents[0]].out_data[0].shape) ValueError: cannot reshape array of size 460275 into shape (1,5415,4) Do you find where we should change in object_detection_demo_yolov3_async.py to make it run normally?

TNTWEN commented 4 years ago

And I think maybe we should edit the masks in yolov4.json the fit the mask in darknet/cfg/yolov4-custom.cfg which is mask=0,1,2.

I think i don't quite understand your question.Can you be more specific https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4-custom.cfg#L969 https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4.cfg#L967

AlanHN commented 4 years ago

And I think maybe we should edit the masks in yolov4.json the fit the mask in darknet/cfg/yolov4-custom.cfg which is mask=0,1,2.

I think i don't quite understand your question.Can you be more specific https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4-custom.cfg#L969 https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4.cfg#L967

here is the mask file when I train my model https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4-custom.cfg#L968 and here is the masks in yolov4.json https://github.com/TNTWEN/OpenVINO-YOLOV4/blob/534cca38d1e3bf95dce98daa216a57f62a2f83ce/yolov4.json#L10 When I was training my yolov3, I find a tutorial saying these two mask should be same. (I am sorry I can't find it now) I am new to yolo, I am not quite sure.

TNTWEN commented 4 years ago

And I think maybe we should edit the masks in yolov4.json the fit the mask in darknet/cfg/yolov4-custom.cfg which is mask=0,1,2.

I think i don't quite understand your question.Can you be more specific https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4-custom.cfg#L969 https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4.cfg#L967

here is the mask file when I train my model https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4-custom.cfg#L968 and here is the masks in yolov4.json https://github.com/TNTWEN/OpenVINO-YOLOV4/blob/534cca38d1e3bf95dce98daa216a57f62a2f83ce/yolov4.json#L10

When I was training my yolov3, I find a tutorial saying these two mask should be same. (I am sorry I can't find it now) I am new to yolo, I am not quite sure.

I think they are the same now. The order is 0, 1, 2 3, 4, 5 6, 7, 8 https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4-custom.cfg#L968 https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4-custom.cfg#L1056 https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4-custom.cfg#L1144

So my json file: "masks":[[0, 1, 2], [3, 4, 5], [6, 7, 8]] they are already the same

AlanHN commented 4 years ago

And I think maybe we should edit the masks in yolov4.json the fit the mask in darknet/cfg/yolov4-custom.cfg which is mask=0,1,2.

I think i don't quite understand your question.Can you be more specific https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4-custom.cfg#L969 https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4.cfg#L967

here is the mask file when I train my model https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4-custom.cfg#L968 and here is the masks in yolov4.json https://github.com/TNTWEN/OpenVINO-YOLOV4/blob/534cca38d1e3bf95dce98daa216a57f62a2f83ce/yolov4.json#L10

When I was training my yolov3, I find a tutorial saying these two mask should be same. (I am sorry I can't find it now) I am new to yolo, I am not quite sure.

I think they are the same now. The order is 0, 1, 2 3, 4, 5 6, 7, 8 https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4-custom.cfg#L968 https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4-custom.cfg#L1056 https://github.com/AlexeyAB/darknet/blob/05dee78fa3c41d92eb322d8d57fb065ddebc00b4/cfg/yolov4-custom.cfg#L1144

So my json file: "masks":[[0, 1, 2], [3, 4, 5], [6, 7, 8]] they are already the same

thank you, I didn't see the others