microsoft / respirenet Goto Github PK
View Code? Open in Web Editor NEWThis is the official implementation of the work RespireNet.
License: MIT License
This is the official implementation of the work RespireNet.
License: MIT License
Hello , @sidgairo18 :
Very appreciate your works for controbuting the AI Medical.
I have a little question about the input arguments
parser.add_argument('--aug_scale', default=None, type=float, help='Augmentation multiplier')
the aug_scale type was set to float,
However when I add the --aug_scale 1 in the command,
i got the following problems:
Traceback (most recent call last):
File "/home/RespireNet_lab/train.py", line 316, in <module> trainer = Trainer()
File "/home/RespireNet_lab/train.py", line 124, in __init__ True,
"params_json", self.input_transform, stetho_id=self.args.stetho_id, aug_scale=self.args.aug_scale)
File "/home/RespireNet_lab/image_dataloader.py", line 95, in __init__
self.new_augment(scale=aug_scale)
File "/home/RespireNet_lab/image_dataloader.py", line 130,
in new_augment for idx in range(aug_nos):
TypeError: 'float' object cannot be interpreted as an integer
and If I set the type to int
: parser.add_argument('--aug_scale', default=None, type=int, help='Augmentation multiplier')
it will appear the following problems:
get individual cycles from each audio file:: 100%|██████████| 722/722 [11:40<00:00, 1.03it/s]
Traceback (most recent call last):
File "/home/RespireNet_lab/train.py", line 316, in <module> trainer = Trainer()
File "/home/RespireNet_lab/train.py", line 124, in __init__
True, "params_json", self.input_transform, stetho_id=self.args.stetho_id, aug_scale=self.args.aug_scale)
File "/home/RespireNet_lab/image_dataloader.py", line 111, in __init__
self.device_wise[self.file_to_device[sample[2]]].append(sample)
KeyError: '203_1p2_Ar_mc_AKGC417L-203_1p4_Ar_mc_AKGC417L'
could you tell us how to start up this data aug function?
thanks in advance.
Hello, author:
I think you let acc = Score, in your valid stage code, you let :
`acc = accuracy_score(y_true, y_pred)`
however, the official scocre defination : score = (sp + se)/2 which you use it in the training stage but in the valid stage you use acc instead.
Can you check it out, thanks a lot.
Hi, I ran your code and it reported an error as follows
Original Traceback (most recent call last):
File "/home/sata/zsb/miniconda/lib/python3.9/site-packages/torch/utils/data/_u tils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home/sata/zsb/miniconda/lib/python3.9/site-packages/torch/utils/data/_u tils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/sata/zsb/miniconda/lib/python3.9/site-packages/torch/utils/data/_u tils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/zsb/LHT2/Feiyin/image_dataloader.py", line 248, in getitem
audio = split_and_pad([audio, 0,0,0,0], self.desired_length, self.sample_rat e, types=1)[0][0]
File "/home/zsb/LHT2/Feiyin/utils.py", line 120, in split_and_pad
padded = generate_padded_samples(soundclip, soundclip, output_buffer_length, sample_rate, types); pad_times = (output_buffer_length-len(soundclip))/len(soun dclip)
File "/home/zsb/LHT2/Feiyin/utils.py", line 176, in generate_padded_samples
copy[:src_length] = source[:]
ValueError: setting an array element with a sequence. The requested array would exceed the maximum number of dimension of 1.
I really want to know why this error emerges, thank u!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.