{
  "id": 570676,
  "title": "Attention to the dataset and YOLO8",
  "url": "/competitions/byu-locating-bacterial-flagellar-motors-2025/discussion/570676",
  "author_name": "",
  "post_date": "2025-03-29T23:15:18.920383100Z",
  "votes": null,
  "comment_count": 7,
  "views": 0,
  "content": "<p>The flagellar motors in bacteria, whose coordinates need to be identified in the images, have been labeled by a person. In most cases, upon closer inspection, an image with a different number could also be considered. Therefore, it is better to train the labeled data separately and the data without flagellar motors separately. I used YOLOv8 for this task. I would appreciate your feedback.  </p>",
  "messages": [
    {
      "id": "3162875",
      "postDate": "03/29/2025 23:15:18",
      "content": "<p>The flagellar motors in bacteria, whose coordinates need to be identified in the images, have been labeled by a person. In most cases, upon closer inspection, an image with a different number could also be considered. Therefore, it is better to train the labeled data separately and the data without flagellar motors separately. I used YOLOv8 for this task. I would appreciate your feedback.  </p>",
      "rawMarkdown": "The flagellar motors in bacteria, whose coordinates need to be identified in the images, have been labeled by a person. In most cases, upon closer inspection, an image with a different number could also be considered. Therefore, it is better to train the labeled data separately and the data without flagellar motors separately. I used YOLOv8 for this task. I would appreciate your feedback.",
      "votes": null
    },
    {
      "id": "3167399",
      "postDate": "04/01/2025 13:44:19",
      "content": "<p>If I am understanding this correctly, what is the benefit to this?  During inference how will you know to use the model trained on images with motors versus the model trained on empty images?</p>\n<p>Are you proposing a two stage model where the first stage is a classifier for whether or not the volume has motors and the second stage detects them?</p>",
      "rawMarkdown": "If I am understanding this correctly, what is the benefit to this?  During inference how will you know to use the model trained on images with motors versus the model trained on empty images?\n\nAre you proposing a two stage model where the first stage is a classifier for whether or not the volume has motors and the second stage detects them?",
      "votes": null
    },
    {
      "id": "3167634",
      "postDate": "04/01/2025 18:00:26",
      "content": "<p>Still genuinely confused on what your approach is and why it is at all beneficial :)</p>",
      "rawMarkdown": "Still genuinely confused on what your approach is and why it is at all beneficial :)",
      "votes": null
    },
    {
      "id": "3167811",
      "postDate": "04/01/2025 21:05:36",
      "content": "<p>Two specialized models:</p>\n<p>Model A: Trained exclusively on images with flagellar motors (becomes expert at motor detection)</p>\n<p>Model B: Trained exclusively on images without motors (becomes expert at identifying empty/background features)</p>\n<p>Inference workflow:</p>\n<p>A fast binary classifier (gatekeeper) first analyzes each image:</p>\n<p>If motors are likely present → sends to Model A</p>\n<p>If clearly no motors → sends to Model B</p>\n<p>Why This Beats a Single Model:<br>\nHigher Accuracy:</p>\n<p>Model A never sees empty images → no \"distraction\" from irrelevant features</p>\n<p>Model B specializes in background patterns → fewer false positives</p>\n<p>Faster Processing:</p>\n<p>~80% of empty images get processed by lightweight Model B</p>\n<p>Heavy Model A only runs on the ~20% that likely contain motors</p>\n<p>Lower Error Rates:</p>\n<p>Model A detects motors with higher confidence (trained only on positive cases)</p>\n<p>Model B better recognizes true negatives (trained only on empty images)</p>",
      "rawMarkdown": "Two specialized models:\n\nModel A: Trained exclusively on images with flagellar motors (becomes expert at motor detection)\n\nModel B: Trained exclusively on images without motors (becomes expert at identifying empty/background features)\n\nInference workflow:\n\nA fast binary classifier (gatekeeper) first analyzes each image:\n\nIf motors are likely present → sends to Model A\n\nIf clearly no motors → sends to Model B\n\nWhy This Beats a Single Model:\nHigher Accuracy:\n\nModel A never sees empty images → no \"distraction\" from irrelevant features\n\nModel B specializes in background patterns → fewer false positives\n\n Faster Processing:\n\n~80% of empty images get processed by lightweight Model B\n\nHeavy Model A only runs on the ~20% that likely contain motors\n\n Lower Error Rates:\n\nModel A detects motors with higher confidence (trained only on positive cases)\n\nModel B better recognizes true negatives (trained only on empty images)",
      "votes": null
    },
    {
      "id": "3167837",
      "postDate": "04/01/2025 21:37:09",
      "content": "<p>This is similar to an approach I’ve tried. My only revision I’d put to this approach it to not include a “Model A” since your prediction for a tomogram with no motors should always be the same.</p>",
      "rawMarkdown": "This is similar to an approach I’ve tried. My only revision I’d put to this approach it to not include a “Model A” since your prediction for a tomogram with no motors should always be the same.",
      "votes": null
    },
    {
      "id": "3167854",
      "postDate": "04/01/2025 22:01:00",
      "content": "<p>Currently, my focus is on increasing the number of training datasets for the model. One of the tasks I’m working on is rotating suitable training images in 4 directions to quadruple the amount of training data</p>",
      "rawMarkdown": "Currently, my focus is on increasing the number of training datasets for the model. One of the tasks I’m working on is rotating suitable training images in 4 directions to quadruple the amount of training data",
      "votes": null
    },
    {
      "id": "3167899",
      "postDate": "04/01/2025 23:28:34",
      "content": "<p>My fear with this approach is that model A needs to perform at a very low inference speed and with very few mistakes because if you falsely classify a model with motors as an input with no motors then it automatically misses every motor in that volume.  Essentially it leaves less room for partial credit.</p>\n<p>Do share your results if you try this, I’d be very interested to see how it goes! :D</p>",
      "rawMarkdown": "My fear with this approach is that model A needs to perform at a very low inference speed and with very few mistakes because if you falsely classify a model with motors as an input with no motors then it automatically misses every motor in that volume.  Essentially it leaves less room for partial credit.\n\nDo share your results if you try this, I’d be very interested to see how it goes! :D",
      "votes": null
    },
    {
      "id": "3167902",
      "postDate": "04/01/2025 23:41:58",
      "content": "<p>Once it's completed, I will definitely share the results.</p>",
      "rawMarkdown": "Once it's completed, I will definitely share the results.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3167399,
      "author_name": "connorjd",
      "author_url": "",
      "post_date": "04/01/2025 13:44:19",
      "content": "<p>If I am understanding this correctly, what is the benefit to this?  During inference how will you know to use the model trained on images with motors versus the model trained on empty images?</p>\n<p>Are you proposing a two stage model where the first stage is a classifier for whether or not the volume has motors and the second stage detects them?</p>",
      "votes": null,
      "replies": [
        {
          "id": 3167634,
          "author_name": "connorjd",
          "author_url": "",
          "post_date": "04/01/2025 18:00:26",
          "content": "<p>Still genuinely confused on what your approach is and why it is at all beneficial :)</p>",
          "votes": null,
          "replies": [
            {
              "id": 3167811,
              "author_name": "ali78kabirzadeh",
              "author_url": "",
              "post_date": "04/01/2025 21:05:36",
              "content": "<p>Two specialized models:</p>\n<p>Model A: Trained exclusively on images with flagellar motors (becomes expert at motor detection)</p>\n<p>Model B: Trained exclusively on images without motors (becomes expert at identifying empty/background features)</p>\n<p>Inference workflow:</p>\n<p>A fast binary classifier (gatekeeper) first analyzes each image:</p>\n<p>If motors are likely present → sends to Model A</p>\n<p>If clearly no motors → sends to Model B</p>\n<p>Why This Beats a Single Model:<br>\nHigher Accuracy:</p>\n<p>Model A never sees empty images → no \"distraction\" from irrelevant features</p>\n<p>Model B specializes in background patterns → fewer false positives</p>\n<p>Faster Processing:</p>\n<p>~80% of empty images get processed by lightweight Model B</p>\n<p>Heavy Model A only runs on the ~20% that likely contain motors</p>\n<p>Lower Error Rates:</p>\n<p>Model A detects motors with higher confidence (trained only on positive cases)</p>\n<p>Model B better recognizes true negatives (trained only on empty images)</p>",
              "votes": null,
              "replies": [
                {
                  "id": 3167837,
                  "author_name": "andrewjdarley",
                  "author_url": "",
                  "post_date": "04/01/2025 21:37:09",
                  "content": "<p>This is similar to an approach I’ve tried. My only revision I’d put to this approach it to not include a “Model A” since your prediction for a tomogram with no motors should always be the same.</p>",
                  "votes": null,
                  "replies": [
                    {
                      "id": 3167854,
                      "author_name": "ali78kabirzadeh",
                      "author_url": "",
                      "post_date": "04/01/2025 22:01:00",
                      "content": "<p>Currently, my focus is on increasing the number of training datasets for the model. One of the tasks I’m working on is rotating suitable training images in 4 directions to quadruple the amount of training data</p>",
                      "votes": null,
                      "replies": []
                    }
                  ]
                },
                {
                  "id": 3167899,
                  "author_name": "connorjd",
                  "author_url": "",
                  "post_date": "04/01/2025 23:28:34",
                  "content": "<p>My fear with this approach is that model A needs to perform at a very low inference speed and with very few mistakes because if you falsely classify a model with motors as an input with no motors then it automatically misses every motor in that volume.  Essentially it leaves less room for partial credit.</p>\n<p>Do share your results if you try this, I’d be very interested to see how it goes! :D</p>",
                  "votes": null,
                  "replies": [
                    {
                      "id": 3167902,
                      "author_name": "ali78kabirzadeh",
                      "author_url": "",
                      "post_date": "04/01/2025 23:41:58",
                      "content": "<p>Once it's completed, I will definitely share the results.</p>",
                      "votes": null,
                      "replies": []
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3162875": "The flagellar motors in bacteria, whose coordinates need to be identified in the images, have been labeled by a person. In most cases, upon closer inspection, an image with a different number could also be considered. Therefore, it is better to train the labeled data separately and the data without flagellar motors separately. I used YOLOv8 for this task. I would appreciate your feedback.",
    "3167399": "If I am understanding this correctly, what is the benefit to this?  During inference how will you know to use the model trained on images with motors versus the model trained on empty images?\n\nAre you proposing a two stage model where the first stage is a classifier for whether or not the volume has motors and the second stage detects them?",
    "3167634": "Still genuinely confused on what your approach is and why it is at all beneficial :)",
    "3167811": "Two specialized models:\n\nModel A: Trained exclusively on images with flagellar motors (becomes expert at motor detection)\n\nModel B: Trained exclusively on images without motors (becomes expert at identifying empty/background features)\n\nInference workflow:\n\nA fast binary classifier (gatekeeper) first analyzes each image:\n\nIf motors are likely present → sends to Model A\n\nIf clearly no motors → sends to Model B\n\nWhy This Beats a Single Model:\nHigher Accuracy:\n\nModel A never sees empty images → no \"distraction\" from irrelevant features\n\nModel B specializes in background patterns → fewer false positives\n\n Faster Processing:\n\n~80% of empty images get processed by lightweight Model B\n\nHeavy Model A only runs on the ~20% that likely contain motors\n\n Lower Error Rates:\n\nModel A detects motors with higher confidence (trained only on positive cases)\n\nModel B better recognizes true negatives (trained only on empty images)",
    "3167837": "This is similar to an approach I’ve tried. My only revision I’d put to this approach it to not include a “Model A” since your prediction for a tomogram with no motors should always be the same.",
    "3167854": "Currently, my focus is on increasing the number of training datasets for the model. One of the tasks I’m working on is rotating suitable training images in 4 directions to quadruple the amount of training data",
    "3167899": "My fear with this approach is that model A needs to perform at a very low inference speed and with very few mistakes because if you falsely classify a model with motors as an input with no motors then it automatically misses every motor in that volume.  Essentially it leaves less room for partial credit.\n\nDo share your results if you try this, I’d be very interested to see how it goes! :D",
    "3167902": "Once it's completed, I will definitely share the results."
  },
  "source": "meta"
}