Giter VIP home page Giter VIP logo

tecno's People

Contributors

tobiascz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tecno's Issues

Package versions

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'

prepare cholec_split_250px_25fps.pkl

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.

AttributeError: 'FeatureExtraction' object has no attribute 'log'

🐛 Bug

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)

Expected behaviour

self.log() should be an attribute of the FeatureExtraction class.

Environment

* 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

pydoc.ErrorDuringImport: problem in modules.mstcn.tecno - ModuleNotFoundError: No module named 'pytorch_lightning.metrics.utils'

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.

Trained Model

Great work and thank you for sharing it!

Would it be possible to share best-performing trained model checkpoints?

cholec_split_250px_25fps.pkl not found error

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.

RuntimeError: Expected object of backend CUDA but got backend CPU for argument #2 'other'

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 !

Running the code - training

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

what are the model settings to reproduce your best results?

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.

image

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.