Comments (4)
I think I have found the bug. The fixed version is now in master.
from solt.
Doesn't it work already if you use from_yaml
? https://oulu-imeds.github.io/solt/utils.html#solt.utils.from_yaml
from solt.
For the transform resize
I am getting the following error message when reading the attached transformation stream:
>> solt.__version__
'0.1.9'
>> solt.utils.from_yaml('trf.yaml')
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/home/user/anaconda3/envs/py37_env/lib/python3.7/site-packages/solt/utils/_utils.py", line 171, in from_yaml
return from_dict(d)
File "/home/user/anaconda3/envs/py37_env/lib/python3.7/site-packages/solt/utils/_utils.py", line 112, in from_dict
transforms[t]["transforms"] = [from_dict(x) for x in transforms[t]["transforms"]]
File "/home/user/anaconda3/envs/py37_env/lib/python3.7/site-packages/solt/utils/_utils.py", line 112, in <listcomp>
transforms[t]["transforms"] = [from_dict(x) for x in transforms[t]["transforms"]]
File "/home/user/anaconda3/envs/py37_env/lib/python3.7/site-packages/solt/utils/_utils.py", line 120, in from_dict
return cls(**transforms[t])
File "/home/user/anaconda3/envs/py37_env/lib/python3.7/site-packages/solt/transforms/_transforms.py", line 635, in __init__
raise TypeError("The argument resize_to has an incorrect type!")
TypeError: The argument resize_to has an incorrect type!
Perhaps I am doing something wrong?
Transformation stream (resulting originally from print(stream.to_yaml())
with codes &id001
and *id001
commented out):
stream:
ignore_fast_mode: false
interpolation: null
optimize_stack: false
padding: null
transforms:
- resize:
interpolation:
- bilinear
- inherit
resize_to: #&id001
- 1920
- 2944
- projection:
affine_transforms:
stream:
ignore_fast_mode: false
interpolation: null
optimize_stack: false
padding: null
transforms:
- rotate:
angle_range:
- -3
- 3
ignore_fast_mode: false
ignore_state: true
interpolation:
- bilinear
- inherit
p: 0.5
padding:
- z
- inherit
- scale:
ignore_fast_mode: false
ignore_state: true
interpolation:
- bilinear
- inherit
p: 0.5
padding:
- z
- inherit
range_x:
- 0.6
- 1.4
range_y:
- 0.6
- 1.4
same: false
- shear:
ignore_fast_mode: false
ignore_state: true
interpolation:
- bilinear
- inherit
p: 0.5
padding:
- z
- inherit
range_x:
- -0.6
- 0.6
range_y:
- -0.6
- 0.6
- translate:
ignore_fast_mode: false
ignore_state: true
interpolation:
- bilinear
- inherit
p: 0.5
padding:
- z
- inherit
range_x:
- -50
- 50
range_y:
- -50
- 50
ignore_fast_mode: false
ignore_state: true
interpolation:
- bilinear
- inherit
p: 0.5
padding:
- z
- inherit
- pad:
pad_to: #*id001
- 1920
- 2944
padding:
- z
- inherit
- crop:
crop_mode: r
- flip:
axis: 1
data_indices: null
p: 0.5
- selective_stream:
ignore_fast_mode: false
n: 1
optimize_stack: false
probs: null
transforms:
- cutout:
cutout_size:
- 384
- 588
data_indices: null
p: 0.5
- selective_stream:
ignore_fast_mode: false
n: 1
optimize_stack: false
probs: null
transforms:
- noise:
data_indices: null
gain_range:
- 0
- 0.1
p: 0.5
- selective_stream:
ignore_fast_mode: false
n: 1
optimize_stack: false
probs: null
transforms:
- blur:
data_indices: null
gaussian_sigma:
- 1
- 2
k_size:
- 3
- 7
- 11
p: 0.5
from solt.
This test passes:
Line 247 in fae62de
from solt.
Related Issues (20)
- RandAugment Implementation HOT 2
- GridMask HOT 1
- Docs aren't building
- Allow to randomly select random number of augmentations in Selective stream
- Add Kornia to the benchmark
- Incorrect serialization of a cropping transform HOT 1
- Brightness needs to support percentages of the mean intensity
- Allow for any number of cutouts in the CutOut transform
- Implement Random Smooth Intensity Scaling Transform
- Fix incorrect Cutout test HOT 1
- Crashed without clear error message when tranforming multiple images with different shapes HOT 4
- NameError: name 'ktps' is not defined HOT 3
- Compatibility issues with latest pytorch HOT 1
- Make resize() with int input keep ratio aspect
- Fix the documentation bug HOT 1
- Broken README file documentation link HOT 1
- Fix documentation website
- Add Github actions integration HOT 1
- Add a proper list of papers that refer to SOLT
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solt.