mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-05 17:34:21 +00:00
1.0 KiB
1.0 KiB
Inception v3
Inception v3 Inference on CUDANet
Usage
- Export pytorch Inception v3 weights pretrained on ImageNet (requires pytorch and torchvision):
python inception_v3.py
-
Follow the instructions from the repository root to build the CUDANet library.
-
Build Inception v3 (requires OpenCV for image loading and preprocessing):
mkdir build
cd build
cmake -S ..
make
- (Optional) Run tests
Generate test input/output and resources by running inception_blocks.py in the test folder
Build and run tests (requires Google Test)
cd build
make test_inception_v3
./tests/test_inception_v3
- Run Inception v3 inference:
inception_v3 ../inception_v3_weights.bin ../image.jpg
Note on Preprocessing
The image preprocessing in this implementation uses OpenCV, which may produce slightly different results compared to PyTorch's Pillow-based preprocessing due to differences in interpolation methods during resizing.