Giter Club home page Giter Club logo

Comments (9)

HuguesTHOMAS avatar HuguesTHOMAS commented on September 6, 2024

Hi @tangbohu,

I just added a piece of code in utils.tester.py, but it might have bugs, tell me if you are able to use it.

Best,
Hugues

from kpconv-pytorch.

tangbohu avatar tangbohu commented on September 6, 2024

Hi @HuguesTHOMAS
Thanks very much for your quick reply!

However, why you run the test for mutiple times as the code below:

while np.min(self.test_counts) < num_votes:
for batch in test_loader:
...

In my opinion, the results for the many different runs should be the same. Besides, I find it appears in the test code for all the tasks. Maybe I misunderstood your intention. Could you help me to explain it.

from kpconv-pytorch.

shangguan9191 avatar shangguan9191 commented on September 6, 2024

same of problem of results interpretation, i do not understand the result.
image

it would be nice if train_acc, test_acc for each epoch could be printed.

from kpconv-pytorch.

HuguesTHOMAS avatar HuguesTHOMAS commented on September 6, 2024

@tangbohu, Because of data augmentation, the result can be different every time you test a shape. THerefore I test all shapes more than once and average the probabilities. This is why the obtained accuracy is a "vote".

@shangguan91, The validation accuracy is printed once at the end of each epoch, when the validation is done. The full confusion matrix is stored in a text file in the log folder, and you can use the plot_convergence.py script to show a graph of the accuracy. As for the training accuracy, it is not a useful measure, so it is not fully computed. I only check the accuracy on each training batch to have an idea if the networks start converging.

from kpconv-pytorch.

shangguan9191 avatar shangguan9191 commented on September 6, 2024

@HuguesTHOMAS i understand.
so, how many times does it to take to train 50 epochs? it tooks like 15 minutes for first 5 epoch, i remember.

from kpconv-pytorch.

HuguesTHOMAS avatar HuguesTHOMAS commented on September 6, 2024

It depends on your computer. A few hours generally

from kpconv-pytorch.

tangbohu avatar tangbohu commented on September 6, 2024

@tangbohu, Because of data augmentation, the result can be different every time you test a shape. THerefore I test all shapes more than once and average the probabilities. This is why the obtained accuracy is a "vote".

Thanks Hugues for your kind reply!

But should we apply data augmentation during testing? In my previous work on 2D images, I apply data augmentation only for the training stage.

Besides, since with the following code in your ModelNet40Dataset

"self.epoch_n = min(self.num_models, config.validation_size * config.batch_num)", with setting config.validation_size = 200,
the evulation is only applied to a part of test set instead of all the test shapes.

from kpconv-pytorch.

dogyoonlee avatar dogyoonlee commented on September 6, 2024

@tangbohu
Did you solved this problem?

I'm confused too because of the evaluation accuracies are so different.
I also agree your opinion that the data augmentation should be applied during training and test should be performed on whole test set at once.

from kpconv-pytorch.

HuguesTHOMAS avatar HuguesTHOMAS commented on September 6, 2024

@tangbohu, sorry for the late reply, it is very common to apply data augmentation on test set. This vote strategy was first introduced by paper using image projection of the shapes (commonly referred as multiview networks as they use multiple views of a shape to classify it). Then people started to use same idea with 3D architectures. The "good practice" for such problems really depend on the applications. If you consider realtime applications like autonomous vehicles, then you cannot spare time to do augmentation on test set, but for offline applications like 3D mapping it is totally acceptable and even advised to ensure more consistency in the results

Concerning the part of the code you highlighted, this only concerns one epoch of validation, but the validation is applied at every epoch. We cannot spend to much time at every epoch to test all shapes, so we just test some of them, and at each epoch, I choose new part of the test set, so that every shape is tested eventually. In fact if you look at the ModelNet40 sampler, you will see that when self.use_potential is True, each shape of the test set is ensured to be tested the same number of times as the others.

@dogyoonlee, I hope that answer your question too.

from kpconv-pytorch.

Related Issues (20)

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.