ekilic / heatmap-learner-cnn-for-object-counting Goto Github PK
View Code? Open in Web Editor NEWHeatmap Learner Convolutional Neural Network for Object Counting and Localization
Heatmap Learner Convolutional Neural Network for Object Counting and Localization
rawmode = RAWMODE[im.mode]
KeyError: 'RGBA'
raise OSError(f"cannot write mode {im.mode} as JPEG") from e
OSError: cannot write mode RGBA as JPEG
is this because of PILLOW library or incorrect dataset path?
This single object detection with heatmap learning. Is this the same idea with the rep https://github.com/littleaich/heatmap-regulation. (regression counting) or detection based counting.
Can you publish your source code ?
I was trying this on my jupyter notebook and got some directory issue.
def __init__(self, root, set, train = True):
self.root = root self.path_devkit = os.path.join(root, 'CARPK') self.path_images = os.path.join(root, 'CARPK', 'Images') self.classes = object_categories self.train = train id_list_file = os.path.join(self.path_devkit, 'ImageSets//{0}.txt'.format(set)) self.ids = [id_.strip() for id_ in open(id_list_file)] print('CARPK dataset set=%s number of classes=%03d number of images=%d' % ( set, len(self.classes), len(self.ids)))
have corrected with "//" in my code.
I tried to run train.py to train from scratch. The result I obtained with test.py is:
MAE: 8.969498910675382
RMSE: 17.12831237942957
When I try to download the pretrained model and run test.py, the result I obtained are:
MAE: 2.122004357298475
RMSE: 3.026390819827392
Thank you.
The model trained through open source code is on the CARPK dataset, MAE=7.17, MRES=13.88, which is much worse than the trained model "trained_model_CARPK_x8_2_12.pt" you provided. Where did the problem go wrong?
Looking forward to your reply, thank you
I was trying the testing on my local machine. is there a way to use lower resolution images? otherwise it's throwing below error:
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 28.1 MiB for an array with shape (720, 1280, 4) and data type float64
Run the test.py with the trained model on the CARPK dataset gave much worse results than reported in the paper.
MAE: 16.21132897603486
RMSE: 31.96154415873697
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.