A Rust-based library from vmlab
Project description
vmlab-py-package
pypi link : vmlab_py
Rust 기반으로 구현된 Python 패키지 vmlab-py
목표
- Native 언어로 구현하여 python내에서 성능 효율성 높이기
프로젝트 정보
- 현재 버전 0.1.7
- GitHub Repository: vmlab-py-package
- PyPI: vmlab-py
설치
pip install vmlab-py==0.1.6
모듈에 포함된 함수
1. a2ev1_melspectrogram
- 설명: Audio2Exp V1 모델을 위한 Mel Spectrogram 생성 (샘플레이트가 다를 경우 16000으로 변환)
- 입력:
wav(numpy.ndarray): numpy.ndarray 형태의 WAV 데이터sample_rate(u32):wav의 sample rate
- 출력:
- Mel Spectrogram을 바이트 리스트로 반환
2. a2ev2_melspectrogram
- 설명: Audio2Exp V2 모델을 위한 Mel Spectrogram 생성 (샘플레이트가 다를 경우 16000으로 변환)
- 입력:
wav(numpy.ndarray): numpy.ndarray 형태의 WAV 데이터sample_rate(u32):wav의 sample rate
- 출력:
- Mel Spectrogram을 바이트 리스트로 반환
3. dummy_func
- 설명: 초기화를 위한 더미 함수
- 출력:
- 더미 값
0반환
- 더미 값
4. reconstruct_mask
- 설명: CompactMaskModel로부터 그레이스케일 마스크 복원
- 입력:
bytes(PyBytes): CompactMaskModel의 직렬화된 데이터width(usize): 출력 이미지의 너비height(usize): 출력 이미지의 높이scale(Tuple(f32, str)): 마스크의 크기 조정 비율 및 리사이징 필터 타입 (옵션)- FilterType:
- NEAREST: "nearest" 또는 "lowest"
- LINEAR: "linear", "triangle", "low"
- CATMULLROM: "catmullrom", "cubic", "medium"
- GAUSSIAN: "gaussian", "high"
- LANZOS: "lanzos", "highest"
- FilterType:
- 출력:
- 복원된 마스크를
numpy.ndarray형태로 반환 (H, W)
- 복원된 마스크를
Publish
Requirements
pip install maturin
Build the python package
maturin build --release
Test in locally
pip install target/wheels/{GENERATED_WHEELS_NAME}.whl
Publish to PyPI
maturin publish
Build for arm and upload file
manylinux에서 빌드. (manylinux는 다양한 리눅스 배포판에서 동작할 수 있는 **바이너리 파이썬 패키지(whl 파일)**를 제공하기 위해 만들어짐.)
Dockerfile에서 빌드 및 업로드까지 해결. ( FROM quay.io/pypa/manylinux_2_28_aarch64 )
Build (on x86 host):
- 변수 PASS에 토큰 입력 필요
docker buildx build --platform linux/arm64 --build-arg PASS=<token> -t maturin-arm-builder .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vmlab_py-0.1.9.tar.gz
(31.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vmlab_py-0.1.9.tar.gz.
File metadata
- Download URL: vmlab_py-0.1.9.tar.gz
- Upload date:
- Size: 31.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f056a640e8a3f1e401b0c7fc89d304bc065a04fafaff0acd4a2bb8ec25007d68
|
|
| MD5 |
90fc882808547f8fe07e84a1f154fa41
|
|
| BLAKE2b-256 |
74c381321ea34613ae44c2d533c30f03ebb0d926c489158099af1d66fffa5e04
|
File details
Details for the file vmlab_py-0.1.9-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: vmlab_py-0.1.9-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 620.5 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
082dcb39b6fe42aaa32d326455478ca0b4d1aac25e985adabd290333a52198dc
|
|
| MD5 |
b83bde661dbb98a610952960fc4ded2f
|
|
| BLAKE2b-256 |
bf98fc9be91d3726ca9e5706fde480ebd8ca847e0e7d704c82da2b290ca6f5e2
|