{
  "id": 571625,
  "title": "Seeking Guidance on Proper Approach",
  "url": "/competitions/el-hackathon-2025/discussion/571625",
  "author_name": "Hùng Lê Đình",
  "post_date": "2025-04-04T12:36:43.709000",
  "votes": 2,
  "comment_count": 23,
  "views": 0,
  "content": "<p>I'm new to AI and have no experience with this kind of task.<br>\nI tried building a CNN model to make predictions, but the results weren’t great 😢<br>\nCould anyone suggest the right approach for tackling this problem?</p>",
  "messages": [
    {
      "id": 3170210,
      "postDate": "2025-04-04T12:36:43.710Z",
      "content": "<p>I'm new to AI and have no experience with this kind of task.<br>\nI tried building a CNN model to make predictions, but the results weren’t great 😢<br>\nCould anyone suggest the right approach for tackling this problem?</p>",
      "rawMarkdown": "I'm new to AI and have no experience with this kind of task.\nI tried building a CNN model to make predictions, but the results weren’t great 😢\nCould anyone suggest the right approach for tackling this problem?",
      "votes": 2
    },
    {
      "id": 3170601,
      "postDate": "2025-04-04T20:40:07.423Z",
      "content": "<p>To effectively rank cell types, you need to properly process the images, potentially leverage transfer learning, and select an appropriate loss function to train an end-to-end model.</p>",
      "rawMarkdown": "To effectively rank cell types, you need to properly process the images, potentially leverage transfer learning, and select an appropriate loss function to train an end-to-end model.",
      "replies": [
        {
          "id": 3170769,
          "postDate": "2025-04-05T01:49:50.700Z",
          "content": "<p>I define this task as a regression task, so I choose MSE loss. Is this an appropriate loss function or what loss functions can I use?</p>",
          "rawMarkdown": "I define this task as a regression task, so I choose MSE loss. Is this an appropriate loss function or what loss functions can I use?",
          "replies": [
            {
              "id": 3172719,
              "postDate": "2025-04-07T05:37:13.343Z",
              "content": "<p>smoothL1Loss is a bit better</p>",
              "rawMarkdown": "smoothL1Loss is a bit better"
            }
          ]
        }
      ]
    },
    {
      "id": 3170321,
      "postDate": "2025-04-04T15:22:45.617Z",
      "content": "<p>CNN is a viable choice. Using a ResNet34 network, I was able to achieve a score of 0.68. I believe one key point is the size of the input images during training.</p>",
      "rawMarkdown": "CNN is a viable choice. Using a ResNet34 network, I was able to achieve a score of 0.68. I believe one key point is the size of the input images during training.",
      "replies": [
        {
          "id": 3170335,
          "postDate": "2025-04-04T15:41:58.980Z",
          "content": "<p>I used patch_size = 110x110 for each spots and resized to 128x128 when training <br>\nHowever, using EfficientNetB0, I got only 0.3 and the result each training turn varied too much. </p>",
          "rawMarkdown": "I used patch_size = 110x110 for each spots and resized to 128x128 when training \nHowever, using EfficientNetB0, I got only 0.3 and the result each training turn varied too much. \n",
          "replies": [
            {
              "id": 3170337,
              "postDate": "2025-04-04T15:45:31.170Z",
              "content": "<p>I think this patch size might be a bit too large—you could try reducing it. As for the unstable training results, you might want to consider using data augmentation.</p>",
              "rawMarkdown": "I think this patch size might be a bit too large—you could try reducing it. As for the unstable training results, you might want to consider using data augmentation."
            },
            {
              "id": 3170353,
              "postDate": "2025-04-04T16:06:04.337Z",
              "content": "<p>thank you so much<br>\nI'll try again</p>",
              "rawMarkdown": "thank you so much\nI'll try again"
            },
            {
              "id": 3170416,
              "postDate": "2025-04-04T17:57:24.950Z",
              "rawMarkdown": "",
              "isDeleted": true
            },
            {
              "id": 3170417,
              "postDate": "2025-04-04T17:57:58.840Z",
              "content": "<p>I have tried training a simple mlp to 35 targets on features extracted by resnet34(using patch size of 32) and got a score of around 0.4, I don't know where I am going wrong</p>",
              "rawMarkdown": "I have tried training a simple mlp to 35 targets on features extracted by resnet34(using patch size of 32) and got a score of around 0.4, I don't know where I am going wrong"
            },
            {
              "id": 3172622,
              "postDate": "2025-04-07T03:04:39.407Z",
              "content": "<p>Me too, have you found out the problems ? </p>",
              "rawMarkdown": "Me too, have you found out the problems ? "
            },
            {
              "id": 3178931,
              "postDate": "2025-04-14T19:41:59.023Z",
              "content": "<p>I have tried multiple times , but always get a score of around 0.5, did you find the correct patch size for training the model?</p>",
              "rawMarkdown": "I have tried multiple times , but always get a score of around 0.5, did you find the correct patch size for training the model?"
            },
            {
              "id": 3179074,
              "postDate": "2025-04-15T02:22:47.690Z",
              "content": "<p>I am using patch size 96 for each spot and resizing to 224 when training.</p>",
              "rawMarkdown": "I am using patch size 96 for each spot and resizing to 224 when training.\n"
            },
            {
              "id": 3179205,
              "postDate": "2025-04-15T06:58:53.887Z",
              "content": "<p>I tried 32, and plotted it on image, 32 can contain 3-4 spots at once in patch,also tried 64 and got similar results, not much difference, got the max score of around 0.55 using pretrained vgg mapping to 35 targets using a linear layer and mae loss, none of the pretrained models I tried have been able to break the barrier of 0.55(my 0.68 score was one of and not stable), people at &gt;0.8 must be doing really something different for this much gap. but nothing is working for me</p>",
              "rawMarkdown": "I tried 32, and plotted it on image, 32 can contain 3-4 spots at once in patch,also tried 64 and got similar results, not much difference, got the max score of around 0.55 using pretrained vgg mapping to 35 targets using a linear layer and mae loss, none of the pretrained models I tried have been able to break the barrier of 0.55(my 0.68 score was one of and not stable), people at >0.8 must be doing really something different for this much gap. but nothing is working for me"
            },
            {
              "id": 3179276,
              "postDate": "2025-04-15T08:54:29.363Z",
              "content": "<p>Oh, you are using the same training method with me, except the patch size.<br>\nMy score is very unstable too, maybe because the train and test data are different.<br>\nHave you tried to predict ranks of cell types instead of abundances ?</p>",
              "rawMarkdown": "Oh, you are using the same training method with me, except the patch size.\nMy score is very unstable too, maybe because the train and test data are different.\nHave you tried to predict ranks of cell types instead of abundances ?"
            },
            {
              "id": 3179313,
              "postDate": "2025-04-15T09:34:03Z",
              "content": "<p>I tried some form of pairwise loss, to train for relative order, but my score got worse, I'm not sure if I implemented the lost function correctly in my code tho. By the way I just tried 96 patch size keeping everything else same, and got the same result of around 0.55. I think too that each of the train and test slides are somewhat fundamentally different and maybe this is the area where improvement really, I'm new to these kinds of challenges, so I'm really running out of ideas to try and not seeing any improvement.</p>",
              "rawMarkdown": "I tried some form of pairwise loss, to train for relative order, but my score got worse, I'm not sure if I implemented the lost function correctly in my code tho. By the way I just tried 96 patch size keeping everything else same, and got the same result of around 0.55. I think too that each of the train and test slides are somewhat fundamentally different and maybe this is the area where improvement really, I'm new to these kinds of challenges, so I'm really running out of ideas to try and not seeing any improvement."
            },
            {
              "id": 3186437,
              "postDate": "2025-04-24T16:43:03.317Z",
              "content": "<p>Were you able to figure how to go past that 0.5 mark? </p>",
              "rawMarkdown": "Were you able to figure how to go past that 0.5 mark? "
            },
            {
              "id": 3186629,
              "postDate": "2025-04-25T01:29:55.917Z",
              "content": "<p>Not really<br>\nBut I am able to achieve over 0.5 with densenet121 model <br>\nYou can try it or try to ensemble models (it will improve so much)</p>",
              "rawMarkdown": "Not really\nBut I am able to achieve over 0.5 with densenet121 model \nYou can try it or try to ensemble models (it will improve so much)"
            },
            {
              "id": 3188029,
              "postDate": "2025-04-26T23:41:53.137Z",
              "content": "<p>Thanks! I'm getting negative values for abundances for certain cell types, are you also noticing that?</p>",
              "rawMarkdown": "Thanks! I'm getting negative values for abundances for certain cell types, are you also noticing that?\n"
            },
            {
              "id": 3188652,
              "postDate": "2025-04-28T02:08:57.923Z",
              "content": "<p>Yes, but I think it's not a big deal <br>\nBecause the metric is Spearman, only depend on the ranking of the abundance of cell types</p>",
              "rawMarkdown": "Yes, but I think it's not a big deal \nBecause the metric is Spearman, only depend on the ranking of the abundance of cell types"
            }
          ]
        },
        {
          "id": 3170556,
          "postDate": "2025-04-04T19:55:08.150Z",
          "content": "<p>you mean your cv on validation set was 0.68? </p>",
          "rawMarkdown": "you mean your cv on validation set was 0.68? ",
          "replies": [
            {
              "id": 3170597,
              "postDate": "2025-04-04T20:37:48.397Z",
              "content": "<p>I am close to 0.78, will submit soon. </p>",
              "rawMarkdown": "I am close to 0.78, will submit soon. "
            },
            {
              "id": 3170620,
              "postDate": "2025-04-04T21:00:20.693Z",
              "content": "<p>are you sure you did the train-val split slide wise? I made that mistake once and got cv greater than 0.7</p>",
              "rawMarkdown": "are you sure you did the train-val split slide wise? I made that mistake once and got cv greater than 0.7"
            },
            {
              "id": 3170623,
              "postDate": "2025-04-04T21:03:32.553Z",
              "content": "<p>Let's see. I will submit soon.</p>",
              "rawMarkdown": "Let's see. I will submit soon."
            }
          ]
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 3170601,
      "author_name": "Cyrus",
      "author_url": "",
      "post_date": "2025-04-04T20:40:07.423000",
      "content": "<p>To effectively rank cell types, you need to properly process the images, potentially leverage transfer learning, and select an appropriate loss function to train an end-to-end model.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 3170769,
          "author_name": "Hùng Lê Đình",
          "author_url": "",
          "post_date": "2025-04-05T01:49:50.700000",
          "content": "<p>I define this task as a regression task, so I choose MSE loss. Is this an appropriate loss function or what loss functions can I use?</p>",
          "votes": 0,
          "replies": [
            {
              "id": 3172719,
              "author_name": "M.Sujit Ragav",
              "author_url": "",
              "post_date": "2025-04-07T05:37:13.343000",
              "content": "<p>smoothL1Loss is a bit better</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3170321,
      "author_name": "Junyu Hou",
      "author_url": "",
      "post_date": "2025-04-04T15:22:45.617000",
      "content": "<p>CNN is a viable choice. Using a ResNet34 network, I was able to achieve a score of 0.68. I believe one key point is the size of the input images during training.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 3170335,
          "author_name": "Hùng Lê Đình",
          "author_url": "",
          "post_date": "2025-04-04T15:41:58.980000",
          "content": "<p>I used patch_size = 110x110 for each spots and resized to 128x128 when training <br>\nHowever, using EfficientNetB0, I got only 0.3 and the result each training turn varied too much. </p>",
          "votes": 0,
          "replies": [
            {
              "id": 3170337,
              "author_name": "Junyu Hou",
              "author_url": "",
              "post_date": "2025-04-04T15:45:31.170000",
              "content": "<p>I think this patch size might be a bit too large—you could try reducing it. As for the unstable training results, you might want to consider using data augmentation.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3170353,
              "author_name": "Hùng Lê Đình",
              "author_url": "",
              "post_date": "2025-04-04T16:06:04.337000",
              "content": "<p>thank you so much<br>\nI'll try again</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3170416,
              "author_name": "",
              "author_url": "",
              "post_date": "2025-04-04T17:57:24.950000",
              "content": "",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3170417,
              "author_name": "Aditya Gupta",
              "author_url": "",
              "post_date": "2025-04-04T17:57:58.840000",
              "content": "<p>I have tried training a simple mlp to 35 targets on features extracted by resnet34(using patch size of 32) and got a score of around 0.4, I don't know where I am going wrong</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3172622,
              "author_name": "Hùng Lê Đình",
              "author_url": "",
              "post_date": "2025-04-07T03:04:39.407000",
              "content": "<p>Me too, have you found out the problems ? </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3178931,
              "author_name": "Aditya Gupta",
              "author_url": "",
              "post_date": "2025-04-14T19:41:59.023000",
              "content": "<p>I have tried multiple times , but always get a score of around 0.5, did you find the correct patch size for training the model?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3179074,
              "author_name": "Hùng Lê Đình",
              "author_url": "",
              "post_date": "2025-04-15T02:22:47.690000",
              "content": "<p>I am using patch size 96 for each spot and resizing to 224 when training.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3179205,
              "author_name": "Aditya Gupta",
              "author_url": "",
              "post_date": "2025-04-15T06:58:53.887000",
              "content": "<p>I tried 32, and plotted it on image, 32 can contain 3-4 spots at once in patch,also tried 64 and got similar results, not much difference, got the max score of around 0.55 using pretrained vgg mapping to 35 targets using a linear layer and mae loss, none of the pretrained models I tried have been able to break the barrier of 0.55(my 0.68 score was one of and not stable), people at &gt;0.8 must be doing really something different for this much gap. but nothing is working for me</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3179276,
              "author_name": "Hùng Lê Đình",
              "author_url": "",
              "post_date": "2025-04-15T08:54:29.363000",
              "content": "<p>Oh, you are using the same training method with me, except the patch size.<br>\nMy score is very unstable too, maybe because the train and test data are different.<br>\nHave you tried to predict ranks of cell types instead of abundances ?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3179313,
              "author_name": "Aditya Gupta",
              "author_url": "",
              "post_date": "2025-04-15T09:34:03",
              "content": "<p>I tried some form of pairwise loss, to train for relative order, but my score got worse, I'm not sure if I implemented the lost function correctly in my code tho. By the way I just tried 96 patch size keeping everything else same, and got the same result of around 0.55. I think too that each of the train and test slides are somewhat fundamentally different and maybe this is the area where improvement really, I'm new to these kinds of challenges, so I'm really running out of ideas to try and not seeing any improvement.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3186437,
              "author_name": "Argaja Shende",
              "author_url": "",
              "post_date": "2025-04-24T16:43:03.317000",
              "content": "<p>Were you able to figure how to go past that 0.5 mark? </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3186629,
              "author_name": "Hùng Lê Đình",
              "author_url": "",
              "post_date": "2025-04-25T01:29:55.917000",
              "content": "<p>Not really<br>\nBut I am able to achieve over 0.5 with densenet121 model <br>\nYou can try it or try to ensemble models (it will improve so much)</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3188029,
              "author_name": "Argaja Shende",
              "author_url": "",
              "post_date": "2025-04-26T23:41:53.137000",
              "content": "<p>Thanks! I'm getting negative values for abundances for certain cell types, are you also noticing that?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3188652,
              "author_name": "Hùng Lê Đình",
              "author_url": "",
              "post_date": "2025-04-28T02:08:57.923000",
              "content": "<p>Yes, but I think it's not a big deal <br>\nBecause the metric is Spearman, only depend on the ranking of the abundance of cell types</p>",
              "votes": 0,
              "replies": []
            }
          ]
        },
        {
          "id": 3170556,
          "author_name": "Cyrus",
          "author_url": "",
          "post_date": "2025-04-04T19:55:08.150000",
          "content": "<p>you mean your cv on validation set was 0.68? </p>",
          "votes": 0,
          "replies": [
            {
              "id": 3170597,
              "author_name": "Cyrus",
              "author_url": "",
              "post_date": "2025-04-04T20:37:48.397000",
              "content": "<p>I am close to 0.78, will submit soon. </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3170620,
              "author_name": "Aditya Gupta",
              "author_url": "",
              "post_date": "2025-04-04T21:00:20.693000",
              "content": "<p>are you sure you did the train-val split slide wise? I made that mistake once and got cv greater than 0.7</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3170623,
              "author_name": "Cyrus",
              "author_url": "",
              "post_date": "2025-04-04T21:03:32.553000",
              "content": "<p>Let's see. I will submit soon.</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3170210": "I'm new to AI and have no experience with this kind of task.\nI tried building a CNN model to make predictions, but the results weren’t great 😢\nCould anyone suggest the right approach for tackling this problem?",
    "3170601": "To effectively rank cell types, you need to properly process the images, potentially leverage transfer learning, and select an appropriate loss function to train an end-to-end model.",
    "3170321": "CNN is a viable choice. Using a ResNet34 network, I was able to achieve a score of 0.68. I believe one key point is the size of the input images during training."
  }
}