Comments (3)
Can you elaborate more with an example?
from image_bbox_slicer.
For example,
my original image called "image1", "image2","image3",.... I would like to add to each tile image the original name plus a sequencial number.
image1_1; image1_2;.....
from image_bbox_slicer.
For images, you'd have to change the for loop at line 234 in image_bbox_slicer/main.py to something like this:
for tile_id, tile in enumerate(tiles):
new_im = im.crop(tile)
img_id_str = str('{}_{}'.format(file_name, tile_id+1))
if len(self._ignore_tiles) != 0:
if img_id_str in self._ignore_tiles:
self._ignore_tiles.remove(img_id_str)
continue
new_im.save(
'{}/{}.{}'.format(self.IMG_DST, img_id_str, file_type))
new_ids.append(img_id_str)
img_no += 1
I did not test this code, I just wrote it out by copy-pasting from the source just so you get the idea. Make sure to do similar changes wherever I am initializing the image id string e.g., line 316 where sliced annotations can be renamed.
from image_bbox_slicer.
Related Issues (9)
- Sound like a good tool to integrate in ecommerces, to get the product isolated image from the original image HOT 1
- xml annotation has initial sourcefile rather than tile filename, which causes problems when converting to TF records HOT 2
- How to combine the sliced image? HOT 2
- Filename exception although file names and paths are the same or correct - windows issue HOT 5
- slicer bbox annotations HOT 3
- Tile size cannot exceed image size HOT 8
- Merge sliced annotations HOT 1
- validate_file_names not working properly when filenames include '.' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image_bbox_slicer.