Comments (3)
Hi,
The Gaussian kernel is normalized by its sum, so for any standard deviation, the kernel sums to one. Thus the standard deviation does not affect the count of the density map. It does affect how sharp/diffused the density map is, i.e. a small standard deviation will result in a sharp density map. And for our dataset, we found keeping the SD as quarter window size works well. One motivation for using quarter window size as the SD is the fact that Gaussian distributions contain around 95% of the data within 2 * SD from the mean.
from learningtocounteverything.
Thank you very much for the information.
from learningtocounteverything.
Hello. Viresh.
Thanks for the great work.
I have one question related to this issue.
In issue #27 , you mentioned that we can use (https://github.com/CommissarMa/MCNN-pytorch/blob/master/data_preparation/k_nearest_gaussian_kernel.py) to generate gaussian density maps.
However, in the mentioned source, using the quarter window size is not set as default.
Can you explain how you modified the source to generate gaussian density maps for the FSC-147 dataset?
How can I change the following source code to reflect the window size?
tree = scipy.spatial.KDTree(points.copy(), leafsize=leafsize)
# query kdtree
distances, locations = tree.query(points, k=4)
print ('generate density...')
for i, pt in enumerate(points):
pt2d = np.zeros(img_shape, dtype=np.float32)
if int(pt[1])<img_shape[0] and int(pt[0])<img_shape[1]:
pt2d[int(pt[1]),int(pt[0])] = 1.
else:
continue
if gt_count > 1:
sigma = (distances[i][1]+distances[i][2]+distances[i][3])*0.1
Thank you very much.
Best regards.
from learningtocounteverything.
Related Issues (20)
- LearningToCountEverything HOT 1
- The multi-scale feature extraction module consists of the first four blocks from a pre-trained ResNet-50 backbone HOT 4
- Questions about the difference between the real image size and annotated image size HOT 4
- How to append new data HOT 2
- Experiments on CARPK HOT 2
- Code for this
- Bounding boxes for FSC HOT 1
- Available platform plugins are: eglfs, minimal, minimalegl, offscreen, vnc, xcb.
- Cannot open Google link "https://drive.google.com/file/d/1ymDYrGs9DSRicfZbSCDiOu0ikGDh5k6S/view?usp=sharing" HOT 3
- how to create my datasets HOT 3
- Cannot open the link "https://archive.org/details/FSC147-GT" HOT 2
- About annotation.json HOT 4
- Hello, could you tell me how the density map is generated HOT 5
- Finetuning Code
- Could you please provide the images before resize to 384? HOT 1
- Continue training after crash or shutdown
- How to achieve multi GPU training
- Val-COCO and Test-COCO
- error in Intallation of torchvision
- Sum of Density Map
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learningtocounteverything.