requirements.txt updated @torch1.4
speed augmentation updated paramters updated
This commit is contained in:
parent
196b1af7ae
commit
28d0034269
10
README.md
10
README.md
@ -9,9 +9,10 @@ Clone it to find a collection of:
|
|||||||
- Utility Function for Model I/O
|
- Utility Function for Model I/O
|
||||||
- DL Modules
|
- DL Modules
|
||||||
- A Plotter Object
|
- A Plotter Object
|
||||||
- Audio Related Tools and Funtion
|
- Audio related Tools and Funtion
|
||||||
- Librosa
|
- Librosa
|
||||||
- Scipy Signal
|
- Scipy Signal
|
||||||
|
- PointCloud related Tools and Functions
|
||||||
|
|
||||||
###Notes:
|
###Notes:
|
||||||
- Use directory links to link from your main project folder to the ml_lib folder. Pycharm will automatically use
|
- Use directory links to link from your main project folder to the ml_lib folder. Pycharm will automatically use
|
||||||
@ -19,11 +20,10 @@ Clone it to find a collection of:
|
|||||||
\
|
\
|
||||||
\
|
\
|
||||||
For Windows Users:
|
For Windows Users:
|
||||||
```
|
``` bash
|
||||||
mklink /d "ml_lib" "..\ml_lib""
|
mklink /d "ml_lib" "..\ml_lib""
|
||||||
```
|
```
|
||||||
For Unix User:
|
For Unix User:
|
||||||
|
``` bash
|
||||||
|
ln -s ../ml_lib ml_lib
|
||||||
```
|
```
|
||||||
TBA
|
|
||||||
```
|
|
||||||
- Cheers
|
|
@ -9,18 +9,19 @@ import numpy as np
|
|||||||
|
|
||||||
class Speed(object):
|
class Speed(object):
|
||||||
|
|
||||||
def __init__(self, max_ratio=0.3, speed_factor=1):
|
def __init__(self, max_amount=0.3, speed_min=1, speed_max=1):
|
||||||
self.speed_factor = speed_factor
|
self.speed_max = speed_max
|
||||||
self.max_ratio = max_ratio
|
self.speed_min = speed_min
|
||||||
|
self.max_amount = max_amount
|
||||||
|
|
||||||
def __call__(self, x):
|
def __call__(self, x):
|
||||||
if not all([self.speed_factor, self.max_ratio]):
|
assert all([self.speed_min, self.speed_max, self.max_amount])
|
||||||
return x
|
start = int(np.random.randint(low=0, high=x.shape[-1], size=1))
|
||||||
start = int(np.random.randint(0, x.shape[-1],1))
|
width = np.random.uniform(low=0, high=self.max_amount, size=1) * x.shape[-1]
|
||||||
end = int((np.random.uniform(0, self.max_ratio, 1) * x.shape[-1]) + start)
|
end = int(width + start)
|
||||||
end = min(end, x.shape[-1])
|
end = min(end, x.shape[-1])
|
||||||
try:
|
try:
|
||||||
speed_factor = float(np.random.uniform(min(self.speed_factor, 1), max(self.speed_factor, 1), 1))
|
speed_factor = float(np.random.uniform(low=self.speed_min, high=self.speed_max, size=1))
|
||||||
aug_data = librosa.effects.time_stretch(x[start:end], speed_factor)
|
aug_data = librosa.effects.time_stretch(x[start:end], speed_factor)
|
||||||
return np.concatenate((x[:start], aug_data, x[end:]), axis=0)[:x.shape[-1]]
|
return np.concatenate((x[:start], aug_data, x[end:]), axis=0)[:x.shape[-1]]
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
@ -1,62 +1,8 @@
|
|||||||
absl-py==0.9.0
|
|
||||||
attrs==19.3.0
|
|
||||||
bravado==10.6.0
|
|
||||||
bravado-core==5.17.0
|
|
||||||
cachetools==4.1.0
|
|
||||||
certifi==2020.4.5.1
|
|
||||||
chardet==3.0.4
|
|
||||||
click==7.1.2
|
|
||||||
future==0.18.2
|
|
||||||
gitdb==4.0.5
|
|
||||||
GitPython==3.1.2
|
|
||||||
google-auth==1.15.0
|
|
||||||
google-auth-oauthlib==0.4.1
|
|
||||||
grpcio==1.29.0
|
|
||||||
idna==2.9
|
|
||||||
imageio==2.8.0
|
|
||||||
jsonpointer==2.0
|
|
||||||
jsonref==0.2
|
|
||||||
jsonschema==3.2.0
|
|
||||||
Markdown==3.2.2
|
|
||||||
monotonic==1.5
|
|
||||||
msgpack==1.0.0
|
|
||||||
msgpack-python==0.5.6
|
|
||||||
natsort==7.0.1
|
natsort==7.0.1
|
||||||
neptune-client==0.4.113
|
neptune-client==0.4.109
|
||||||
numpy==1.18.4
|
|
||||||
oauthlib==3.1.0
|
|
||||||
packaging==20.4
|
|
||||||
pandas==1.0.3
|
|
||||||
Pillow==7.1.2
|
|
||||||
protobuf==3.12.0
|
|
||||||
py3nvml==0.2.6
|
|
||||||
pyasn1==0.4.8
|
|
||||||
pyasn1-modules==0.2.8
|
|
||||||
PyJWT==1.7.1
|
|
||||||
pyparsing==2.4.7
|
|
||||||
pyrsistent==0.16.0
|
|
||||||
python-dateutil==2.8.1
|
|
||||||
pytorch-lightning==0.7.6
|
pytorch-lightning==0.7.6
|
||||||
pytz==2020.1
|
|
||||||
PyYAML==5.3.1
|
|
||||||
requests==2.23.0
|
|
||||||
requests-oauthlib==1.3.0
|
|
||||||
rfc3987==1.3.8
|
|
||||||
rsa==4.0
|
|
||||||
simplejson==3.17.0
|
|
||||||
six==1.14.0
|
|
||||||
smmap==3.0.4
|
|
||||||
strict-rfc3339==0.7
|
|
||||||
swagger-spec-validator==2.5.0
|
|
||||||
tensorboard==2.2.1
|
|
||||||
tensorboard-plugin-wit==1.6.0.post3
|
|
||||||
test-tube==0.7.5
|
test-tube==0.7.5
|
||||||
torch==1.5.0+cu101
|
torch==1.4.0
|
||||||
torchvision==0.6.0+cu101
|
torchcontrib==0.0.2
|
||||||
tqdm==4.46.0
|
torchvision==0.5.0
|
||||||
typing-extensions==3.7.4.2
|
tqdm==4.45.0
|
||||||
urllib3==1.25.9
|
|
||||||
webcolors==1.11.1
|
|
||||||
websocket-client==0.57.0
|
|
||||||
Werkzeug==1.0.1
|
|
||||||
xmltodict==0.12.0
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user