This pull request is mostly for documentation as opposed to an actual request, since I'm requesting to merge it into my own branch outside of master and develop.
This adds a new problem type to DPP: object counting by performing semantic segmentation on heatmaps.
A new subclass of DPPModel was added for this problem type. It includes a loader for datasets with images and a CSV file with multiple x,y points as labels; those labels are used to generate label heatmaps with 2D gaussian distributions at the label points. An alternative loader that works similarly to the one for semantic segmentation problems with image masks as labels is also provided.
Within the overridden test accuracy output, the differences in the total sum/object count between the test images and labels are included in the output (as well as the mean of those differences).
A number of bugs, both old and new with regards to the subclass refactoring for problem types, were also found and fixed while implementing the new problem type. Some of the more serious ones include:
Tensorboard outputs for specific problem types were not being output but were always run and added to the graph. Running training without Tensorboard output would also crash DPP during graph construction.
Visualising network outputs using get_weights_as_image always assumed a display grid of 4xN (i.e. the number of outputs to visualise was a multiple of 4), causing the reshape operations in that function to crash when that was not the case.
The test suite was updated to include heatmap-based object counting and all of the test pass. All of the examples should also run fine as well.
This pull request is mostly for documentation as opposed to an actual request, since I'm requesting to merge it into my own branch outside of
master
anddevelop
.This adds a new problem type to DPP: object counting by performing semantic segmentation on heatmaps.
A new subclass of
DPPModel
was added for this problem type. It includes a loader for datasets with images and a CSV file with multiple x,y points as labels; those labels are used to generate label heatmaps with 2D gaussian distributions at the label points. An alternative loader that works similarly to the one for semantic segmentation problems with image masks as labels is also provided.Within the overridden test accuracy output, the differences in the total sum/object count between the test images and labels are included in the output (as well as the mean of those differences).
A number of bugs, both old and new with regards to the subclass refactoring for problem types, were also found and fixed while implementing the new problem type. Some of the more serious ones include:
get_weights_as_image
always assumed a display grid of 4xN (i.e. the number of outputs to visualise was a multiple of 4), causing the reshape operations in that function to crash when that was not the case.The test suite was updated to include heatmap-based object counting and all of the test pass. All of the examples should also run fine as well.