expressions updated to fit libtorch v1.4.0 and opencv4.0 #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for sharing the code to the cpp libtorch starters. I found something needs to be updated and hope others won't need to do it again.
prediction.cpp should be updated as pull request.
model_trace.py: "model = torchvision.models.resnet18(pretrained=True)" may result "SSL: CERTIFICATE_VERIFY_FAILED", which can be solved by adjusting "https://" into "http://" in "torchvision.models.resnet.model_urls"...
the installation of dependant libs of opencv and libtorch maybe hard for starters, will be better if mentioned in step 0 or 1 in README.md
like:
install libs of opencv:
for MacOS, xcode-select --install, install XCODE in app store(will automatically install cmake make gcc g++ I guess), apt install opencv(will install opencv4.0 and take a really long time).....
install libtorch:
wget https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip
unzip libtorch-shared-with-deps-latest.zip
for Linux:
apt install gcc
apt install c++
apt install cmake
apt install make
and etc...