Skip to content

Commit

Permalink
1.0.2.1 fixed crash on instagram,
Browse files Browse the repository at this point in the history
when opening empty labels
  • Loading branch information
cad0p committed Jul 20, 2019
1 parent 1dbe234 commit 841722a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
6 changes: 3 additions & 3 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ Keep in mind to use pip or pip3 depending on your settings.

Clone this repo

Run `pip install maskrcnn-modanet --user`
Run `pip install maskrcnn-modanet`

Or go to the repo you just cloned on the terminal and run `pip install . -e --user`
Or go to the repo you just cloned on the terminal and run `pip install -e .`

If you see any errors, just install the dependencies manually, just like this: `pip3 install --upgrade cython --user`
If you see any errors, just install the dependencies manually, just like this: `pip3 install --upgrade cython`

Now that you've installed it, run `maskrcnn-modanet datasets download the/folder/you/want/to/put/data/in`

Expand Down
38 changes: 20 additions & 18 deletions maskrcnn_modanet/instagram_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,26 +658,28 @@ def instagramImpl(profile, limit=None, offset=0, process_images=True, profile_st
break
segments = [img_ann['segment'] for pic_index in labels_images
for img_ann in labels_images[pic_index][label] ]
if len(segments) > 0:
print('There are ', len(segments), ' results. Tell me the start and the end, as if you were slicing a Python array')
print('You can also find the results in the folder:\n' + "/".join(segments[0].split("/")[:-1]))
from_i = input('Start: ')
if from_i == '':
from_i = None
else:
from_i = int(from_i)
to_i = input('End: ')
if to_i == '':
to_i = None
else:
to_i = int(to_i)

print('There are ', len(segments), ' results. Tell me the start and the end, as if you were slicing a Python array')
print('You can also find the results in the folder:\n' + "/".join(segments[0].split("/")[:-1]))
from_i = input('Start: ')
if from_i == '':
from_i = None
else:
from_i = int(from_i)
to_i = input('End: ')
if to_i == '':
to_i = None
else:
to_i = int(to_i)




for segment_path in segments[from_i:to_i]:
img = Image.open(segment_path)
img.show(title=segment_path.split('/')[-1])
del img
for segment_path in segments[from_i:to_i]:
img = Image.open(segment_path)
img.show(title=segment_path.split('/')[-1])
del img
else:
print('There are no segments to show for this label.\n')

# plt.figure(figsize=(5, 5), num=str(pic_index), dpi=400)
# plt.axis('off')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setuptools.setup(
name='maskrcnn-modanet',
version='1.0.2',
version='1.0.2.1',
# scripts=[
# 'maskrcnn_modanet/cli/main.py'
# ],
Expand Down

0 comments on commit 841722a

Please sign in to comment.