Skip to content
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

Better build flow #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

michaelchien1972
Copy link

This will make sub directory first, and generate final so file

This will make sub directory first, and generate final so file
@lucheng07082221
Copy link

@ The speed of yoloV3 by tensorRT+deepStream?

@Gotta-C
Copy link

Gotta-C commented Nov 13, 2018

how to get calibration.table if the yolov3 backbone was modified?
Turns the results when I run INT8:
New calibration table will be created to build the engine
trt-yolo-app: ../builder/cudnnBuilder2.cpp:685: virtual std::vector<nvinfer1::query::Portsnvinfer1::query::TensorRequirements > nvinfer1::builder::Node::getSupportedFormats(const nvinfer1::query::Portsnvinfer1::query::AbstractTensor&, const nvinfer1::cudnn::HardwareContext&, nvinfer1::builder::Format::Type, const nvinfer1::builder::FormatTypeHack&) const: Assertion `sf' failed.

@Yuuuuuuuuuuuuuuuuuummy
Copy link

hi @vat-nvidia
I run trt-yolo-app on xavier, but Why the m_Height needs to equal m_Width? I try to run my yolov3 network but meet this error, I wonder why

@TyroneLi
Copy link

TyroneLi commented Jul 2, 2019

Hi,I use deepstream-yolo-app.cpp to get the yolov3 detected bounding box coordinates information.But they didn't match each other.
`while ((gst_meta = gst_buffer_iterate_meta (buf, &state))) {
if (gst_meta_api_type_has_tag (gst_meta->info->api, _nvdsmeta_quark)) {

  nvdsmeta = (NvDsMeta *) gst_meta;

  /* We are interested only in intercepting Meta of type
   * "NVDS_META_FRAME_INFO" as they are from our infer elements. */
  if (nvdsmeta->meta_type == NVDS_META_FRAME_INFO) {
    frame_meta = (NvDsFrameMeta *) nvdsmeta->meta_data;
    if (frame_meta == NULL) {
      g_print ("NvDS Meta contained NULL meta \n");
      frame_number++;
      return GST_PAD_PROBE_OK;
    }

    if(output_kitti)
    {
      g_snprintf(bbox_file, sizeof(bbox_file) - 1, "%s/%06d.txt",
        output_kitti, frame_number);
        bbox_params_dump_file = fopen(bbox_file, "w");
    }

    num_rects = frame_meta->num_rects;

    /* This means we have num_rects in frame_meta->obj_params.
     * Now lets iterate through them and count the number of cars,
     * trucks, persons and bicycles in each frame */

    for (rect_index = 0; rect_index < num_rects; rect_index++) {
      obj_meta = (NvDsObjectParams *) & frame_meta->obj_params[rect_index];
      rect_params = &(obj_meta->rect_params);
      text_params = &(obj_meta->text_params);
      if (!g_strcmp0 (obj_meta->attr_info[YOLO_UNIQUE_ID].attr_label,
              "car"))
        {
          // g_print("CAR topX=%d, topY=%d, width=%d, height=%d, score=%.2f\n", 
          // rect_params->left, rect_params->top, 
          // (rect_params->left + rect_params->width),
          // (rect_params->top + rect_params->height),
          // obj_meta->attr_info[YOLO_UNIQUE_ID].attrs->attr_prob);
          // g_print("txtTopLeft=%d, txtTopRight=%d\n", 
          // text_params->x_offset, text_params->y_offset);
          // g_print("attr_label=%s\n", 
          // obj_meta->attr_info[YOLO_UNIQUE_ID].attr_label);
          // g_print("CAR topX=%d, topY=%d, width=%d, height=%d\n", 
          // obj_meta->line_params[0].x1, obj_meta->line_params[0].y1,
          // obj_meta->line_params[0].x2, obj_meta->line_params[0].y2);
          if(bbox_params_dump_file)
          {
            int left = (int)(rect_params->left);
            int top = (int)(rect_params->top);
            int right = left + (int)(rect_params->width);
            int bottom = top + (int)(rect_params->height);
            int class_index = obj_meta->class_id;
            char *text = "car";
            fprintf(bbox_params_dump_file,
              "%s  %d.00 %d.00 %d.00 %d.00 \n",
              text, left, top, right, bottom);
            std::cout << text << " left=" << left << " top=" << top << 
              " right=" << right << " bottom=" << bottom << std::endl;
          }
          car_count++;
        }
      else if (!g_strcmp0 (obj_meta->attr_info[YOLO_UNIQUE_ID].attr_label,
              "person"))
        {
          // g_print("PERSON topX=%d, topY=%d, width=%d, height=%d, score=%.2f\n", 
          // rect_params->left, rect_params->top, 
          // (rect_params->left + rect_params->width),
          // (rect_params->top + rect_params->height),
          //  obj_meta->attr_info[YOLO_UNIQUE_ID].attrs->attr_prob);
          // g_print("CAR topX=%d, topY=%d, width=%d, height=%d\n", 
          // obj_meta->line_params[0].x1, obj_meta->line_params[0].y1,
          // obj_meta->line_params[0].x2, obj_meta->line_params[0].y2);
          if(bbox_params_dump_file)
          {
            int left = (int)(rect_params->left);
            int top = (int)(rect_params->top);
            int right = left + (int)(rect_params->width);
            int bottom = top + (int)(rect_params->height);
            int class_index = obj_meta->class_id;
            char *text = "person";
            fprintf(bbox_params_dump_file,
              "%s  %d.00 %d.00 %d.00 %d.00 \n",
              text, left, top, right, bottom);
            std::cout << text << " left=" << left << " top=" << top << 
              " right=" << right << " bottom=" << bottom << std::endl;
          }
          person_count++;
        } 
      else if (!g_strcmp0 (obj_meta->attr_info[YOLO_UNIQUE_ID].attr_label,
              "bicycle"))
        {
          // g_print("BICYCLE topX=%d, topY=%d, width=%d, height=%d, score=%.2f\n", 
          // rect_params->left, rect_params->top, 
          // (rect_params->left + rect_params->width),
          // (rect_params->top + rect_params->height),
          //  obj_meta->attr_info[YOLO_UNIQUE_ID].attrs->attr_prob);
          // g_print("CAR topX=%d, topY=%d, width=%d, height=%d\n", 
          // obj_meta->line_params[0].x1, obj_meta->line_params[0].y1,
          // obj_meta->line_params[0].x2, obj_meta->line_params[0].y2);
          bicycle_count++;
        }
      else if (!g_strcmp0 (obj_meta->attr_info[YOLO_UNIQUE_ID].attr_label,
              "truck"))
       {
        //  g_print("TRUCK topX=%d, topY=%d, width=%d, height=%d, score=%.2f\n", 
        //   rect_params->left, rect_params->top, 
        //   (rect_params->left + rect_params->width),
        //   (rect_params->top + rect_params->height),
        //    obj_meta->attr_info[YOLO_UNIQUE_ID].attrs->attr_prob);
        // g_print("CAR topX=%d, topY=%d, width=%d, height=%d\n", 
        //   obj_meta->line_params[0].x1, obj_meta->line_params[0].y1,
        //   obj_meta->line_params[0].x2, obj_meta->line_params[0].y2);
          truck_count++;
       }
    }
    if(bbox_params_dump_file)
    {
      fclose(bbox_params_dump_file);
      bbox_params_dump_file = NULL;
    }
  }
}`

I use these way to get boxes information but it didn't match the data that I set --print_prediction_info=true in yolov3.txt file.What is the difference between them?How can I parse the boxes corrdinates???

@ledinhtri97
Copy link

Hello, Can Deepstream 4.0 will support more than two detectors engine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants