-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CFANet or MARUNet ? #3
Comments
Also, I am unfamiliar with Baidu Disk. Is it possible if the pretrained files are uploaded to Google Drive like SHA? I require SHB for testing. Thanks :) |
One last thing, I edited test_one_image.py to be able to calculate MAE and MSE (RMSE) for this algorithm on the SHA dataset (BTW I am using the provided pre-trained MARNet provided in the README). However, what I don't understand is the reason for defining "divide" and "ds" in img_test function. I left them as default: divide = 50 and ds = 8, and got results MAE 30.33 and MSE 61.11 which is lower than what is reported in the paper. Should the parameters be set differently? I am also assuming that dmp, when divided by "divide" is the amount of predicted people in the crowd. BTW sorry for the spam, I am trying out the algorithm for a uni assignment so any help is appreciated :P |
Thanks for your interest. MARUNet in this repo is identical to the the CFANet without Density level estimator, that means only density map estimator and crowd region recognizer are used. The second row |
Don't worry about writing some issues if it can help you! In img_test function of test_one_image.py, we divide the parameter |
Great, I will try it again soon with the correct parameters! Thanks @rongliangzi! Also, is it possible that SHB is uploaded to Google Drive? (I am unfamiliar with Baidu Disk - when I input the extraction code I get some error in a language I don't know :P ) |
Will upload it soon. |
It worked :) MAE: 57.66 Thanks for your help once again! However computation is slow because I had to comment out lines 64-66 from def img_test() in test_one_image.py. I get the following error: RuntimeError: CUDA out of memory. Tried to allocate 1.38 GiB (GPU 0; 8.00 GiB total capacity; 4.82 GiB already allocated; 1.01 GiB free; 4.85 GiB reserved in total by PyTorch) I tried clearing cuda cache etc. but it didn't work. The only way I got it to work is by commenting the lines 64-66, however it was slow. Not so much of a problem for me but I thought I would let you know (just in case) |
|
thanks for the upload! With regards to the CUDA issue, I have understood the problem. Therefore I have changed my script so that the model is only allocated once to the GPU. With each call to img_test, i pass this model which is on GPU, and transfer the image to the GPU with Upon launch the pre-trained model is always loaded successfully, so I do not think it is an issue with the model. |
You can try
since |
Yes it worked for a 100 images, and then the same error occured. Maybe do I need to allocate more GB of space? I have a GPU with 8GB of VRAM but I don't think it is an issue. Maybe clearing the cache per 100 detections? Update: clearing cache did not work |
Generally testing phrase doesn't require much GPU. Maybe some of your codes should be reviewed. |
you can refer to val() function in utils/functions.py. The val() should meet your need of testing on a dataset exactly. The parameter Hope it works well. |
Yes I am having a look at it. Reading the code, I do not see a definition for RawDataset() class. This might be an issue |
Using CrowdDataset() class in /dataset.py is ok. |
I am still trying to figure out whats wrong with my implementation. I run out of CUDA memory on the same 5 images on SHA. I know this because i did a |
make sure in testing phrase you don't save many variables that keep gradients such as predicted dmp. Try using a.item() for tensor a if needed. |
One image only have similar problem. Model loaded. 6GB free VRam Runtime Error: CUDA out of memory. What problem can be? Thanks! |
Hi,
I am confused as to how the model within the repo is called MARUNet, while the paper calls it CFANet. Are these two different models or are they the same thing? I am asking this because MARUNet is not mentioned within the CFANet paper.
TIA
The text was updated successfully, but these errors were encountered: