Answers.Body: <blockquote>
    <p>For example, if I have the crowd images labeled based on their crowd density (low, moderate, high), and I'm not interested in the count, but the density class (low, moderate, high), can't I train the network to classify the data based on these classes as a classification network?</p>
  </blockquote>
  
  <p>Yes you can, all you need is enough correctly labelled training data.</p>
  
  <p>A good rule of thumb is if a human expert can assign the correct label from an image (and purely from the image, not using extra information) then it is a realistic goal to train a CNN to perform the same labelling. </p>
  
  <blockquote>
    <p>why there hasn't been attempts to tackle this type of task as a classification problem.</p>
  </blockquote>
  
  <p>Probably because there are no natural, and likely no widely accepted, classes in this case (I may be wrong, maybe some international society has defined classes you could use). If you use a regression, you can map it to a particular problem case - e.g. sending an alert to someone responsible for traffic and safety when crowd density hits some threshold - by setting numerical boundaries to your classes. Using classification and mapping back the other way is harder.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-19T17:57:49.797Z
Answers.Text: I actually can not get why “mapping back the other way is harder”. I have neumarical boundaries set for each class based on what is convenient for the venue I’m interested in classifiying the crowd density for. My concern is that there might not be enough relevant features between images on the same class, since the distribution of people in every image is highly random, and this also could be affected by other foreigen objects.
Answers.UserDisplayName: norahik
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-19T20:37:49.903Z
Answers.Text: @norahik: If you have probabilities for 3 classes and want to predict the actual density, then it is not clear what the mapping should be to get a single value that would match the image. It is not likely to be the mid-point of the most probable category, and nor will it be a simple weighted mean of the midpoints based on the class probabilities (although that is likely closer).
Answers.UserDisplayName: Neil Slater
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-18T09:40:42.153Z
Answers.LastActivityDate: 2019-03-18T16:39:46.237Z
Answers.LastEditDate: 2019-03-18T16:39:46.237Z
Answers.UserDisplayName: Neil Slater
Body: <p>For the case of crowd density estimation using CNN, using datasets like shanhaiTech or UCF, why there hasn't been attempts to tackle this type of task as a classification problem? All current papers I've seen are related to regression, not classification.</p>
  
  <p>For example, if I have the crowd images labeled based on their crowd density (low, moderate, high), and I'm not interested in the count, but the density class (low, moderate, high), can't I train the network to classify the data based on these classes as a classification network?</p>
  
Tags: <convolutional-neural-networks><classification>
Title: Why don't we perform classification of crowd density?
UserDisplayName: norahik
ThreadText: # Why don't we perform classification of crowd density?
  
  (Asked by: username_0 on 2019-03-18)
  
  For the case of crowd density estimation using CNN, using datasets like shanhaiTech or UCF, why there hasn't been attempts to tackle this type of task as a classification problem? All current papers I've seen are related to regression, not classification.
  
  For example, if I have the crowd images labeled based on their crowd density (low, moderate, high), and I'm not interested in the count, but the density class (low, moderate, high), can't I train the network to classify the data based on these classes as a classification network?
  
  **Tags:** convolutional-neural-networks, classification
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-03-18. Score: 2 | Accepted answer
  
  > For example, if I have the crowd images labeled based on their crowd density (low, moderate, high), and I'm not interested in the count, but the density class (low, moderate, high), can't I train the network to classify the data based on these classes as a classification network?
  
  Yes you can, all you need is enough correctly labelled training data.
  
  A good rule of thumb is if a human expert can assign the correct label from an image (and purely from the image, not using extra information) then it is a realistic goal to train a CNN to perform the same labelling.
  
  > why there hasn't been attempts to tackle this type of task as a classification problem.
  
  Probably because there are no natural, and likely no widely accepted, classes in this case (I may be wrong, maybe some international society has defined classes you could use). If you use a regression, you can map it to a particular problem case - e.g. sending an alert to someone responsible for traffic and safety when crowd density hits some threshold - by setting numerical boundaries to your classes. Using classification and mapping back the other way is harder.
  
  > **Comments:**
  > **username_0**: I actually can not get why “mapping back the other way is harder”. I have neumarical boundaries set for each class based on what is convenient for the venue I’m interested in classifiying the crowd density for. My concern is that there might not be enough relevant features between images on the same class, since the distribution of people in every image is highly random, and this also could be affected by other foreigen objects.  
  > **username_1**: @norahik: If you have probabilities for 3 classes and want to predict the actual density, then it is not clear what the mapping should be to get a single value that would match the image. It is not likely to be the mid-point of the most probable category, and nor will it be a simple weighted mean of the midpoints based on the class probabilities (although that is likely closer).  
  
  ---
  
  