mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
Dev 1.x cpp11 (#1086)
* ocr/short_scale_aspect_jitter.cpp scale_factor double to float not working on c++11 * ocr/short_scale_aspect_jitter.cpp scale_factor double to float not working on c++11 * ocr/short_scale_aspect_jitter.cpp scale_factor double to float not working on c++11 add install mmengine in docker file * 1. ocr/short_scale_aspect_jitter.cpp scale_factor double to float not working on c++11 2. add install mmgine in dockerfile 3. add install_mmengine in circleci * fix mmengine typo
This commit is contained in:
parent
2f7e61c55c
commit
00a37df3de
@ -26,8 +26,10 @@ RUN curl -fsSL -v -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Mini
|
||||
RUN /opt/conda/bin/conda install pytorch==${TORCH_VERSION} torchvision==${TORCHVISION_VERSION} cudatoolkit=${CUDA} -c pytorch -c conda-forge
|
||||
ENV PATH /opt/conda/bin:$PATH
|
||||
|
||||
### install mim
|
||||
RUN /opt/conda/bin/pip install openmim
|
||||
### install mim, mmengine, mmcv
|
||||
RUN /opt/conda/bin/pip install openmim &&\
|
||||
mim install mmengine &&\
|
||||
mim install 'mmcv>=2.0.0rc1'
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
|
@ -63,16 +63,12 @@ commands:
|
||||
command: |
|
||||
python -m pip install torch==<< parameters.torch >>+<< parameters.platform >> torchvision==<< parameters.torchvision >>+<< parameters.platform >> -f https://download.pytorch.org/whl/torch_stable.html
|
||||
install_mmcv:
|
||||
parameters:
|
||||
version:
|
||||
type: string
|
||||
default: mmcv>=2.0.0rc1
|
||||
steps:
|
||||
- run:
|
||||
name: Install mmcv-full
|
||||
name: Install mmcv
|
||||
command: |
|
||||
python -m pip install opencv-python==4.5.4.60 openmim
|
||||
mim install << parameters.version >>
|
||||
python -m mim install mmengine "mmcv>=2.0.0rc1"
|
||||
install_mmdeploy:
|
||||
description: "Install MMDeploy"
|
||||
steps:
|
||||
|
@ -78,8 +78,9 @@ class ShortScaleAspectJitterImpl : public Module {
|
||||
auto dst_width = static_cast<int>(std::round(scale * img_shape[2]));
|
||||
dst_height = static_cast<int>(std::ceil(1.0 * dst_height / scale_divisor) * scale_divisor);
|
||||
dst_width = static_cast<int>(std::ceil(1.0 * dst_width / scale_divisor) * scale_divisor);
|
||||
std::vector<float> scale_factor = {1.0 * dst_width / img_shape[2],
|
||||
1.0 * dst_height / img_shape[1]};
|
||||
|
||||
std::vector<float> scale_factor = {(float) (1.0 * dst_width / img_shape[2]),
|
||||
(float) (1.0 * dst_height / img_shape[1])};
|
||||
|
||||
img_resize = ResizeImage(img, dst_height, dst_width);
|
||||
Value output = input;
|
||||
|
Loading…
x
Reference in New Issue
Block a user