This project is for deployment of nanodet-m onnx model, including onnxruntime, ncnn...
- CUDA = 11.3
- Python = 3.8
- Pytorch = 1.10.1
- torchvision==0.11.2
- Create a conda virtual environment and then activate it.
conda create -n nanodet python=3.8 -y
conda activate nanodet
- Install pytorch
conda install pytorch==1.10.1 torchvision==0.11.2 cudatoolkit=11.3 -c pytorch -y
- Clone this repository
git clone https://github.com/aaalvinnn/nanodet-deploy.git
cd nanodet-deploy
- Install requirements
pip install -r requirements.txt
- Setup NanoDet
python setup.py develop
It is provided with 2 versions of inferring:
exam.
infer.py
python .\user\onnxruntime\infer.py image --config .\config\nanodet_custom_xml_dataset.yml --model .\models\nanodet.onnx --path .\user\images\image1.jpg --save_result
while --save_result
is optional.
-
infer_yaml.py
-
change config
nanodet_custom_xml_dataset.yml
; -
python .\user\onnxruntime\infer_yaml.py --config .\config\nanodet_custom_xml_dataset.yml
-
this is a test to test if available when a user in server trying to push and pull respository.