CentroidNet is a hybrid convolutional neural network
- run create_dataset.py to generate a synthetic dataset of your liking.
- run train.py to train a model using this generated dataset.
- adjust config.py to change hyper parameters.
./data/dataset/ contains the image generated by create_dataset.py and the annotations in train.csv and validation.csv.
Replace this data with your own set.
The weights of the CentroidNet model are stored in ./data/CentroidNet.pth
./data/validation_result/_inputs.npy contains the normalized input tensor.
./data/validation_result/_targets.npy contains the normalized target tensor.
./data/validation_result/_centroid_vectors.npy contains the normalized 2-d voting vectors (use this to see the quality of the training).
./data/validation_result/_border_vectors.npy contains the normalized 2-d voting vectors (use this to see the quality of the training).
./data/validation_result/_centroid_votes.npy contains the voting space (use this to tune Config.centroid_threshold and Config.nm-size).
./data/validation_result/_border_votes.npy contains the voting space (use this to tune Config.centroid_threshold and Config.nm-size).
./data/validation_result/_overlay.png contains circles drawn around each object.
./data/validation_result/_class_ids.npy contains the class ids for every pixel.
./data/validation_result/_class_probs.npy contains the class probability for every pixel.
./data/validation_result/validation.txt contains the final circle shapes and class info.
If this code benefits your research please cite:
@article{dijkstra2020centroidnetv2,
title={CentroidNetV2: A Hybrid Deep Neural Network for Small-Object Segmentation and Counting.},
author={Dijkstra, Klaas and van de Loosdrecht, Jaap and Waatze A., Atsma and Schomaker, L.R.B. and Wiering, Marco A.},
booktitle={Neurocomputing},
year={2020},
organization={Elsevier}
DOI={https://doi.org/10.1016/j.neucom.2020.10.075
}
}
For a numpy viewer go to: https://github.com/ArendJanKramer/Numpyviewer.