D-FINE icon indicating copy to clipboard operation
D-FINE copied to clipboard

Help me on how to use the pretrained checkpoint for detection

Open AnishMathewOommen opened this issue 11 months ago • 5 comments

models Let's say I downloaded the D-FINE-M whose checkpoint file(37.4) how to use it for prediction of objects in an image and get the detections.

Please help on After downloading the model, how to directly load and find the inference or prediction

AnishMathewOommen avatar Dec 31 '24 07:12 AnishMathewOommen

https://github.com/Peterande/D-FINE/blob/master/tools/inference/torch_inf.py

GiovanniFyc avatar Dec 31 '24 08:12 GiovanniFyc

@GiovanniFyc. Thank you so much for your reply. Could you please tell me how to feed the downloaded model file to the code?

And also which config file I have to pass as argument

python3 torch_inf.py -r /home/anish/Downloads/dfine_m_obj365.pth -i /home/anish/Downloads/2.jpeg -d cuda 2024-12-31 14:47:40.845093: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0. 2024-12-31 14:47:40.871767: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. usage: torch_inf.py [-h] -c CONFIG -r RESUME -i INPUT [-d DEVICE] torch_inf.py: error: the following arguments are required: -c/--config

AnishMathewOommen avatar Dec 31 '24 09:12 AnishMathewOommen

the following arguments are required: -c/--config,you should download the yaml config,and add -c config_path

GiovanniFyc avatar Jan 03 '25 02:01 GiovanniFyc

Thank you so much @GiovanniFyc . It is working for me now

AnishMathewOommen avatar Jan 03 '25 08:01 AnishMathewOommen

Hello @AnishMathewOommen , Can you please share your code as I am facing continous issues?

FarhAnonymous avatar Feb 06 '25 05:02 FarhAnonymous