-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
Not able to write anchors of yolov4 tiny #57
Comments
@aditdoshi333 Is your YOLOv4-tiny trained for one class? |
Yes it is trained for one class. |
@aditdoshi333 Make sure you follow #23 for filling up the anchors. |
I added this in yolo.py. class YOLOv4(YOLO): Yes, I saw that explanation but I am not able to understand where I am getting wrong. I have tried reverse order as suggested by you for tiny. |
@aditdoshi333 How did you convert YOLO to ONNX? |
@aditdoshi333 Can you try this instead https://github.com/jkjung-avt/tensorrt_demos/blob/master/yolo/yolo_to_onnx.py. You may want to rename your weight and config to yolov4-tiny-1024x768.cfg and yolov4-tiny-1024x768.weight |
Hey, thanks now it is able to create tensorRT engine. But there is a problem I am not able to get any bounding box. I am getting the results when using the same tensorRT engine for inference using (https://github.com/jkjung-avt/tensorrt_demos). But it is not showing any results when using with FastMOT. Are there any processing changes I need to do for yolo 4 tiny? Thank you for the help |
Make sure class_ids in mot.json is set correctly
…On Mon, Feb 22, 2021 at 11:38 PM Adit Doshi ***@***.***> wrote:
Hey, thanks now it is able to create tensorRT engine. But there is a
problem I am not able to get any bounding box. I am getting the results
when using the same tensorRT engine for inference using (
https://github.com/jkjung-avt/tensorrt_demos). But it is not showing any
results when using with FastMOT. Are there any processing changes I need to
do for yolo 4 tiny?
Thank you for the help
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGNJO5QZX4QLOSIAKLINSADTANLOBANCNFSM4YALIYQQ>
.
|
Thanks man! It is working. One more doubt in track.py you are getting the center of the bounding box from tlbr variable. That center x,y is with respect to which frame? Input or some other processing |
I asked this because sometimes I am getting log like [INFO] Out: drone 4 at [-2658 -955] I am not able to understand the negative values of x and y. |
The image size determines the range, which is indicated by |
Closing this now because the issue is resolved |
Thank you for sharing such amazing work. I want to use Yolov4 Tiny with FastMot. But I am getting the following error
python3: yolo_layer.cu:118: virtual nvinfer1::Dims nvinfer1::YoloLayerPlugin::getOutputDimensions(int, const nvinfer1::Dims*, int): Assertion `inputs[0].d[0] == (mNumClasses + 5) * mNumAnchors' failed.
Aborted (core dumped)
class YOLOv4(YOLO):
ENGINE_PATH = Path(file).parent / 'yolo_drone.trt'
MODEL_PATH = Path(file).parent / 'yolo_drone.onnx'
NUM_CLASSES = 1
INPUT_SHAPE = (3, 768, 1024)
LAYER_FACTORS = [32,16]
SCALES = [1.05, 1.05]
ANCHORS = 9, 9, 24, 19, 81, 42, 149, 62, 196,103, 650,416
I am passing anchors as two sub-lists each containing 6 elements. I think I am not missing something while writing anchors.
Any help would be appreciated
Thank you
The text was updated successfully, but these errors were encountered: