tstandley / image2mass

http://proceedings.mlr.press/v78/standley17a/standley17a.pdf
38 stars 16 forks source link

Network retraining code #5

Open lucacrosato opened 5 years ago

lucacrosato commented 5 years ago

Hi, I'm Luca Crosato.

I tried your neural network with some custom images and it didn't perform really well because the objects are quite different from the ones present in the folder test_set_images. I was wondering if you could provide me the code necessary to retrain the network with my custom images.

Thank you very much in advance, Luca Crosato email: lucacrosato7@gmail.com

nicoperillo commented 5 years ago

Hello there I'm Nicolas Perillo.

Your work is amazing and I'm really interested in the same task too, for serious research purposes.

My email is: n.perillo@campus.unimib.it

Thank you so much, N

tstandley commented 5 years ago

Thanks @nicoperillo. Unfortunately, the code I have for it is no longer functional and is pretty messy. @lucacrosato, how exactly are your images different? The most important thing is that they be segmented on pure white backgrounds. Images with backgrounds will not work properly because the geometry module will think the entire image is full of material. How many training instances (image and corresponding weight and corresponding dimensions) do you have? If you want to fine-tune on your own data set, you can extract a mask and geometric features for each image in your set. See the predict method of the ComplexModel class in model_wrapper.py for an example. Then you can use keras's train function on your prepared dataset (a list of images, a parallel list of masks, and a parallel list of features).

shape_aware_model.model.train(...)

That's going to be much better and simpler and easier to get working than my out-dated training code.