Detailed Inference Guideline?
Closed this issue · 6 comments
Hi @zhiyuanyou, I am following #9 for testing if the SAFECount model can accurately count the number of objects in my own small dataset of ~10 images. While following the previously existing thread, I came into some problems/questions:
Remove the codes about "density" in ./datasets/custom_dataset.py.
- I am simply removing everything that contains "density", "MAE", and "RMSE", is this the intended behavior?
Remove the codes about "density", "MAE", and "RMSE" in eval() function of ./tools/train_val.py.
- If so, the eval function in
train_val.py
returns onlyval_mae, val_rmse
. Do I leave it so that there is no return value?
Create your own dataset about inference, i.e., create a json file like example (but with no need of "density").
- Do the numbers in the brackets represent the bounding boxes?
Revise config.yaml to use your own dataset, and run python ./tools/train_val.py -e.
- There are a lot of config.yaml files in the repository. Which one do you want us to revise?
Thanks in advance!
I'd like to verify that:
- whether your images have GT (density map) ?
- how your exemplars are annotated ? Each image has exemplars annotated by boxes, OR, all images share the same exemplars ?
- My images don't have a density map. They are just images of screws and bolts in a box from Google that I wish to test if the model can count overlapping properly.
- Which method would work best for your model? Since I only have ~10 images, I can just draw a bounding box on one element or create a separate sample image.
- If no GT (density map), you should remove the codes about "density" in
./datasets/custom_dataset.py
. - It is better for each image to have exemplars annotated by boxes. In this case, you should follow FSC-147 to create your own json file for inference.
- Since you have no GT (density map), you should revise the function
eval()
in./tools/train_val.py
by removing all codes for evaluation, and just leaving codes for inference. - You can return
val_mae=None, val_rmse=None
, OR, just delete them, since you have no GT (density map) to calculate metrics.
I see. I assume then the output will be my input image but with the detected object segmented and the count?
I'd like to verify that:
- whether your images have GT (density map) ?
- how your exemplars are annotated ? Each image has exemplars annotated by boxes, OR, all images share the same exemplars ?
Hi, if all images share the same exemplars, how should I modified to evaluate at my own data?
The dataset is composed of, for example, a series of images (video) and some reference images.
I see. I assume then the output will be my input image but with the detected object segmented and the count?
Yes, you are right.