-
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
Accuracy and speed of yolov4x-mish #6987
Comments
So currently it is much better than PP-YOLO, EfficientDet, SpineNet and many other models. Darknet:
Pytorch: https://github.com/WongKinYiu/PyTorch_YOLOv4
|
@mive93 Hi, Could you port it to tkDNN / TRT please? |
Hi @AlexeyAB, |
@AlexeyAB Hi ! |
@AlexeyAB Hi, Does OpenCV-dnn also support? |
I didn't test it well:
|
@mive93 Hi, If there is set
So in total:
|
@zpmmehrdad
Currently no, they need the same fixes. |
thank you, I will come back to you as soon as I have some results. |
Hi @AlexeyAB The mAP on tkDNN is the following (with thresh=0.001 and COCO_val_2017)
Then I can test the performance on the Xavier. |
Thanks!
What do you mean?
yolov4x-mish.cfg uses new_coords=1 for all [yolo] layers.
Seems to be it is too small. It should be ~50.0% AP and ~68.5% AP50 for COCO2017-val for yolov4x-mish 672x672 |
Hi @AlexeyAB, never mind, I solved the export problem. I am checking now for the mAP loss. |
@AlexeyAB Hi, |
@duynguyen51 Loss doesn't matter. Show mAP after 30% of total iterations. And use subdivisions=16 or lower. |
Thanks, let me check the result after those iter. |
Hi, this is my mAP after 30% max_iter |
@duynguyen51 [yolo]
max_delta=20
...
[yolo]
max_delta=5
...
[yolo]
max_delta=2 |
Thanks, let me try it. |
@duynguyen51 |
@duynguyen51 If it doesn't help - try to set and train [net]
try_fix_nan=1 |
How many Gb does your graphic card need to train it? Doesn't work with my nvidia gtx 2070(11 Gb) using 16 subdivisions. |
@Goru1890 [net]
width=640
height=640
batch=64
subdivisions=8
optimized_memory=1 |
@AlexeyAB You said :
Is batch 64 really mandatory or it is just to set a mini-batch size minimum (4) |
Yes, you can. I |
ok thanks, Some other questions:
|
No. letter_box=1 is prefered if aspect ratio different for different images and network resolutions. |
Is same with https://github.com/WongKinYiu/ScaledYOLOv4 ? |
So if I have in my dataset only images with the same ratio and resolution, may I put letter_box=0 ? |
@toplinuxsir I fixed it. |
@Goru1890 Yes you can. |
@AlexeyAB
|
Same but IOU is nan... |
Same issue... |
Did Someone tried with "try_fix_nan=1" as well ? |
@AlexeyAB One funny thing I have encountered while trying Yolov4x with your very exact parameters on RTX 3090: There seems to be a starting spick in memory usage when optimize_memory=1 that makes the model crash. |
@arnaud-nt2i Thanks for notice! Does anyone else have the same problem? So should I set |
@toplinuxsir @Goru1890 @duynguyen51 edit: I have found my answer here: WongKinYiu/ScaledYOLOv4#13 (comment) The last commit seems fine, I will try it and report here. |
How did it go? |
@AlexeyAB , I tried the last commit for yolov4 and yolov4x-mish, some strange thing :
|
Yes, i got same error. I also used rtx3090, i can only run properly when optimized_memory=0. |
@mive93 Hi, Lines 1408 to 1436 in e7d029c
|
Hi @AlexeyAB |
Hi @AlexeyAB, However, I think that in your new implementation of the Yolo layer could have problems with Yolov4.
I think my solution is better (tested with all older models and works for everything) (https://github.com/ceccocats/tkDNN/blob/master/src/Yolo.cpp#L91)
|
@mive93 Hi,
int bbox_index = entry_index(b, n*dim.w*dim.h, 0, classes, input_dim, output_dim);
std::cout<<"new_coords"<<new_coords<<std::endl;
if (new_coords == 1){
// nothing
}
else{
activationLOGISTICForward(srcData + bbox_index, dstData + bbox_index, 2*dim.w*dim.h);
int obj_cls_index = entry_index(b, n*dim.w*dim.h, 4, classes, input_dim, output_dim);
activationLOGISTICForward(srcData + obj_cls_index , dstData + obj_cls_index , (1+classes)*dim.w*dim.h);
}
if (this->scaleXY != 1) scalAdd(dstData + bbox_index, 2 * dim.w*dim.h, this->scaleXY, -0.5*(this->scaleXY - 1), 1); |
Yeah you are right, sorry my bad. |
Which is the improvement with the new function new_coords over traditional yolov4?
Did someone try it with COCO?
The text was updated successfully, but these errors were encountered: