SynthText icon indicating copy to clipboard operation
SynthText copied to clipboard

H5 file problem

Open MansourTrabelsi opened this issue 7 years ago • 5 comments

Hello,

After working with my own images(some images), i created << ucm.mat >> with no problem and the segmentation worked fine and i've got the << seg_uint16.h5 >> file. Running the << visualize_result.py >> gave me this error : mansour@mansourpc:~/hala/SynthText-master$ python ./visualize_results.py Traceback (most recent call last): File "./visualize_results.py", line 74, in <module> main('results/SynthText.h5') File "./visualize_results.py", line 55, in main dsets = sorted(db['data'].keys()) File "/usr/lib/python2.7/dist-packages/h5py/_hl/group.py", line 153, in __getitem__ oid = h5o.open(self.id, self._e(name), lapl=self._lapl) File "h5o.pyx", line 173, in h5py.h5o.open (h5py/h5o.c:3403) KeyError: "unable to open object (Symbol table: Can't open object)"

Is the problem with the h5 file ?? Thank you for any advice you give me.

MansourTrabelsi avatar Jul 20 '17 23:07 MansourTrabelsi

visualize_result visualizes the output generated gen.py.

First new samples need to be generated through running gen.py, possibly modifying it to use the new seg_uint16.h5: in its current form, it loads the images and their corresponding depth and segmentation masks from data.h5. You will need to modify it slightly to use your seg_uint16.h5 and also the corresponding depth information. It will then generate a file called SynthText.h5 which you can visualize using visualize_result.py.

ankush-me avatar Jul 21 '17 14:07 ankush-me

What part of the gen.py should be modified ? is it the def get_data(): function ?

MansourTrabelsi avatar Jul 21 '17 17:07 MansourTrabelsi

No. Around this line.

ankush-me avatar Jul 21 '17 18:07 ankush-me

Good evening,

Sorry i didn't really got you perfectly. Should i modify those lines : DATA_PATH = 'data' DB_FNAME = osp.join(DATA_PATH,'dset.h5') and put the path of my own seg_unit16.h5 file ? And if i am working with my own images, why should i download the images, depth and segmentation data ?

Thank you Ankush for your answers.

On Fri, Jul 21, 2017 at 7:21 PM, Ankush Gupta [email protected] wrote:

No, around this line https://github.com/ankush-me/SynthText/blob/master/gen.py#L105.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ankush-me/SynthText/issues/63#issuecomment-317075944, or mute the thread https://github.com/notifications/unsubscribe-auth/AacoyfmJKOAHw_TIpiPDgcgS622elVSGks5sQOwXgaJpZM4OeyRG .

MansourTrabelsi avatar Jul 22 '17 11:07 MansourTrabelsi

Hey are you able to run it?

subramanyakrishna avatar Sep 02 '21 11:09 subramanyakrishna