tobiascz / tecno Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Hello,
Thank you for sharing your code. With current package versions, I couldn't run the code. Could you chech the versions?
I used pytorch-lightning=0.8.5 but self.log is not defined in that version.
AttributeError: 'FeatureExtraction' object has no attribute 'log'
Then I tried also with version 1.0.6 (because it is mentioned in one of the issues) and i got this error
File "/home/kubi/Desktop/TeCNO/train.py", line 57, in train trainer = Trainer( File "/home/kubi/miniconda3/envs/tecnoEnv/lib/python3.9/site-packages/pytorch_lightning/trainer/connectors/env_vars_connector.py", line 41, in overwrite_by_env_vars return fn(self, **kwargs) TypeError: __init__() got an unexpected keyword argument 'log_save_interval'
Hi,
Thanks for sharing the code of your wonderful work.
I followed the instructions and was trying to train the feature extractor as the first step. I've read the code, and my understanding of cholec_split_250px_25fps.pkl is that it's a pickled file including"image_path", "phase class", "time", "video","tool_Grasper", "tool_Bipolar", "tool_Hook", "tool_Scissors", "tool_Clipper", "tool_Irrigator", "tool_SpecimenBag" as the columns.
I wonder where does the "index_nan = [1983913, 900090]" in TeCNO/datasets/cholec80_feature_extract.py come from? Why 1983913, 900090?
Since the cholec_split_250px_25fps.pkl is prepared with 25fps and tool annotations are only given at 1fps. Wouldn't the tool columns for the images with unavailable tool annotation be all nan?
Please excuse me if my questions are too naive.. I am new to this. Thanks a lot for your help.
when I run the command
python train.py -c modules/mstcn/config/config_tcn.yml
there is a error in "/TeCNO/modules/mstcn/tecno.py":
the version of pytorch_lightning==1.0.6 has no the class name "_input_format_classification".
Can someone tell me the correct version of pytorch_lightning?
Hello,
I'm trying to run "python train.py -c modules/cnn/config/config_feature_extract.yml" but get some errors. I tried to get around some of them, but this 'self.log()' error seems very deep within the "pytorch-lightning==0.8.5" version installed.
def validation_step(self, batch, batch_idx):
x, y_phase, y_tool = batch
_, p_phase, p_tool = self.forward(x)
loss = self.loss_phase_tool(p_phase, p_tool, y_phase, y_tool, self.num_tasks)
# acc_phase, acc_tool, loss
if self.num_tasks == 2:
self.val_acc_tool(p_tool, torch.stack(y_tool, dim=1))
self.log("val_acc_tool", self.val_acc_tool, on_epoch=True, on_step=False)
self.val_f1_tool(p_tool, torch.stack(y_tool, dim=1))
self.log("val_f1_tool", self.val_f1_tool, on_epoch=True, on_step=False)
print('p_phase tensor with batche_size, num_classes: ', p_phase)
print('y_phase tensor with batch_size: ', y_phase)
self.val_acc_phase(p_phase, y_phase)
self.log("val_acc_phase", self.val_acc_phase, on_epoch=True, on_step=False)
self.log("val_loss", loss, prog_bar=True, logger=True, on_epoch=True, on_step=False)
self.log() should be an attribute of the FeatureExtraction class.
* CUDA:
- GPU:
- available: False
- version: 10.2
* Packages:
- numpy: 1.17.4
- pyTorch_debug: False
- pyTorch_version: 1.9.0+cu102
- pytorch-lightning: 0.8.5
- tqdm: 4.62.1
* System:
- OS: Linux
- architecture:
- 64bit
- ELF
- processor: x86_64
- python: 3.8.10
- version: #488-Microsoft Mon Sep 01 13:43:00 PST 2020
Dear authors,
Thanks for sharing the great work.
I would like to ask whether you would kindly consider sharing your trained multi-head resnet50 model on cholec80?
Thank you.
Hi. The problem in this issue "ImportError: cannot import name '_input_format_classification' from 'pytorch_lightning.metrics.utils'" also happened to me.
As a solution, you pointed out "https://github.com/tobiascz/TeCNO/blob/master/requirements.txt"
When I do pip install pytorch-lightning==0.8.5 I get the error "pydoc.ErrorDuringImport: problem in modules.mstcn.tecno - ModuleNotFoundError: No module named 'pytorch_lightning.metrics.utils'"
Thanks.
Great work and thank you for sharing it!
Would it be possible to share best-performing trained model checkpoints?
Hi.
Thank you so much for sharing your perfect code. When I try to run the code, it gives a FileNotFoundError:
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/polyaxon/data1/cholec80/dataframes/cholec_split_250px_25fps.pkl'
where can I find this file? cholec_split_250px_25fps.pkl
Thank you so much and best wishes.
Hi. When I run:
python train.py -c modules/mstcn/config/config_tcn.yml
it gives this error. I installed the requirements file and even using
pip install git+https://github.com/PytorchLightning/pytorch-lightning.git@master
it gives this error. Thanks.
Traceback (most recent call last):
File "train.py", line 173, in
train(hparams, ModuleClass, ModelClass, DatasetClass, loggers)
File "train.py", line 102, in train
trainer.fit(module)
File "/home/data3/wzy/anaconda3/envs/mtcnn/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 1003, in fit
results = self.single_gpu_train(model)
File "/home/data3/wzy/anaconda3/envs/mtcnn/lib/python3.6/site-packages/pytorch_lightning/trainer/distrib_parts.py", line 186, in single_gpu_train
results = self.run_pretrain_routine(model)
File "/home/data3/wzy/anaconda3/envs/mtcnn/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 1213, in run_pretrain_routine
self.train()
File "/home/data3/wzy/anaconda3/envs/mtcnn/lib/python3.6/site-packages/pytorch_lightning/trainer/training_loop.py", line 370, in train
self.run_training_epoch()
File "/home/data3/wzy/anaconda3/envs/mtcnn/lib/python3.6/site-packages/pytorch_lightning/trainer/training_loop.py", line 470, in run_training_epoch
self.run_evaluation(test_mode=False)
File "/home/data3/wzy/anaconda3/envs/mtcnn/lib/python3.6/site-packages/pytorch_lightning/trainer/evaluation_loop.py", line 430, in run_evaluation
self.on_validation_end()
File "/home/data3/wzy/anaconda3/envs/mtcnn/lib/python3.6/site-packages/pytorch_lightning/trainer/callback_hook.py", line 112, in on_validation_end
callback.on_validation_end(self, self.get_model())
File "/home/data3/wzy/anaconda3/envs/mtcnn/lib/python3.6/site-packages/pytorch_lightning/callbacks/early_stopping.py", line 141, in on_validation_end
self._run_early_stopping_check(trainer, pl_module)
File "/home/data3/wzy/anaconda3/envs/mtcnn/lib/python3.6/site-packages/pytorch_lightning/callbacks/early_stopping.py", line 155, in _run_early_stopping_check
if self.monitor_op(current - self.min_delta, self.best_score):
RuntimeError: Expected object of backend CUDA but got backend CPU for argument #2 'other'
How can I solve this problem? Thank you very much !
Hi,
I generated the images and split of dataset, but couldn't find the exact structure of data required to run the training codes.
Could you help me with structure of both images and labels, so I could run the code.
Thanks and Regards
Nisarg Shah
Hi, I wonder what the model settings are in order to reproduce your acc=88.56±0.27 prec=81.64±0.41 rec=85.24±1.06 results?
While the paper states that num_stages=2, what did you use for num_features, and num_layers? Could you please confirm if they are 32 and 8?
The config file and the comments in code don't seem consistent. And I did find it in your paper. Thanks.
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.